DBCP vs c3p0 vs BoneCP

This weekend, I was running some simple benchmarks for Activiti, when one of my threaded benchmarks using the Activiti engine within Spring consistently hanged until forever (or at least 30 minutes, when I killed it). After some googling, I discovered that this could be due to DBCP not releasing connections. And indeed, when switching to c3p0 for connection pooling the issue was resolved and the benchmark ran fine.

In one of the stackoverflow articles I found, mentioned a new connection pool framework, called BoneCP. The license (Apache) and the benchmarks on the website looked good. I did think for myself ‘how much can you improve something trivial as a connection pool’, but decided to give it a go. And sure enough, all my benchmark results came back a little faster compared to c3p0! And on a side-note, the c3p0 results came back a little faster than the dbcp ones.

Anyway, I have no clue if BoneCP is anything production ready (the website claims it does), but a quick questionnaire learned me virtually nobody knew about this library. Hence, I’m happy to educate my readers 🙂

If you have any experiences with BoneCP, feel free to share them!


  1. Guillaume de Vinzelles April 30, 2012

    We use BoneCp with JBPM4 in production with very good results (around 9000 workflows started everyday with at least 4 sub workflows) for a telco ecommerce solution.
    We’re upgrading our solution with Activiti (with BoneCp) and we want to reach 90 000 workflows started everyday.
    Don’t hesitate to contact me if you want more details, and thanks for the good work with Activiti.

  2. Joachim Van der Auwera May 29, 2012

    I like BoneCP, it improved performance a lot (and fixed occasional deadlocks) for an application I was working on. See http://blog.progs.be/139/jdbc-connection-pooling

  3. Vivek Sharma November 21, 2012

    I have used BoneCP for storing more a million records in different database tables. It completes the job in 3 hours with two threads. the Best connection pooling library out there.

  4. Romeo Zdrite May 23, 2013

    Hello, I’m interested how did you manage to identify that DBCP is not releasing the connections. It was just a hunch based on the fact that the connection pool previously had issues with this, or did you manage to clearly identify the fact that it wasn’t releasing the connection causing a DB lock?

    I’m running into a similar issue, and it’s occurring randomly, without being able to replicate the behavior in a controlled environment.

  5. Joram Barrez May 23, 2013

    @Romeo: I think it was a hunch + reading blogs what confirmed the hunch.

    It indeed only happens when you don’t expect it 😉

  6. Brendan Durkin March 26, 2014

    My work has used BoneCp for about 6 years. Although fast, Version 7 has a few bugs. We have just switched to C3PO as C3PO development is more active.

  7. Paolo Avolio June 14, 2016

    Hi man, we used bonecp for a java application that start a lot of thread.
    It run very fast, but we discovered a problem.
    When the thread use a sql with an order by, after connection.close() the areas for sorting doesn’t released causing a fylesystem exception.
    For now, we lost bonecp and we open connection inside the thread, and so we have no problem with the db but performance go dowm….
    We run on a AIX with jvm IBM.
    Did you have experience of cp30 on aix machine?

  8. Joram Barrez June 16, 2016

    @Paolo Avolio: hmmm no, to be honest it’s been ages since I’ve had to run anything on aix …
    I’ve done some good tests with HikariCP… maybe it’s a good idea to look into that instead of BoneCP?

Leave a Reply

Your email address will not be published.