Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8912795
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T04:17:48+00:00 2026-06-15T04:17:48+00:00

I have a problem with BoneCP (0.7.1 RELEASE). I though that BoneCP.getConnection() ensures it

  • 0

I have a problem with BoneCP (0.7.1 RELEASE). I though that BoneCP.getConnection() ensures it would return Connection object assuming that DB is alive.

Here is how I configured my pool

private void setupConnectionPool() throws SQLException
{
    // setup the connection pool
    String connectUri = "jdbc:mysql://master-mysql:3306/base?zeroDateTimeBehavior=convertToNull&tinyInt1isBit=false&useCompression=true";

    BoneCPConfig config = new BoneCPConfig();
    config.setJdbcUrl(connectUri);
    config.setUsername("dbapp");
    config.setPassword("meh");
    config.setMinConnectionsPerPartition(5);
    config.setMaxConnectionsPerPartition(10);
    config.setPartitionCount(1);
    config.setConnectionTimeoutInMs(5 * 1000);

    this.connectionPool = new BoneCP(config); // setup the connection pool
}

then somewhere in the code I use it like this

    // I'm using Apache DbUtils
    QueryRunner run = new QueryRunner();
    Object result = run.query(this.connectionPool.getConnection(), query, handler, start, limit);

Attempt to run this query throws SQLException with state 08S01 (Communications link failure).

Subsequent call to this.connectionPool.getConnection() returns good connection.

But isn’t it a whole point of connection pool so that I don’t have to handle cases of lost connection myself?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T04:17:49+00:00Added an answer on June 15, 2026 at 4:17 am
    1. It should capture 08S01 and wipe out all the connections in the pool. However if you have multiple threads, you might have a thread that has already checked out a connection which might fail (the rest of the connections should become OK again).

    2. Please try out 0.8.0-beta3-SNAPSHOT; I have very recently cleaned up that implementation and added a bunch of robustness tests testing out various scenarios, amongst them, 08S01.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have problem in some JavaScript that I am writing where the Switch statement
i have problem with jquery submit and post. I would like to submit a
I have problem when want read object with where (double variable) this is my
have problem with ampersand (&) How to search for the words (or sentences) that
I have problem with Activities navigation, searching works good. Activities hierarchy looks like that:
I have problem with this method in NLog library: NLog.Targets.Wrappers.AsyncTargetWrapper.ProcessPendingEvents(object state) It consume too
I have problem with simple jquery sliding menu, here is my code: http://jsfiddle.net/kCK44/1/ what
I have problem with http://abfoodpolicy.com/ . In IE 8 and 9 the right sidebar
I have problem with my query on C, I’m using the oci8 driver. This
I have problem with repopulating form_upload after validation. Other input fields or selectboxes are

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.