15

I was using BoneCP for my Java projects. But, unfortunately, I discovered that this pool is unable to recover after the database failure. I am not the only one with such problem (just look at the official forums if you want). As I (and many others) never got answer on bonecp forums, it seems that this project is no longer supported and my issue is unlikely to be fixed.

So, I am looking for an alternative actively developed and supported connection pooling library which is able to handle database outages correctly and recover as soon as database is available again.

Himanshu
  • 31,810
  • 31
  • 111
  • 133
Deinlandel
  • 1,023
  • 8
  • 25
  • 1
    There are in fact no actively support CP libraries imo. Devs seemed to get bored of writing them and supporting them. See below for the most popular CP libraries used nonetheless – MJB Jul 25 '12 at 04:39

5 Answers5

10

The other major contenders are

  • C3P0 - also more or less abandoned, but very capable
  • Proxool - also abandoned
  • DBCP - abandoned for a long time, restarted.
  • HikariCP - new CP that even the BoneCP author concedes is faster
  • Vibur - modern pool, with metrics and slow query logging
  • Tomcat JDBC Pool - included with tomcat, but can be used standalone
David Roussel
  • 5,788
  • 1
  • 30
  • 35
MJB
  • 9,352
  • 6
  • 34
  • 49
  • 2
    Thank you for your answer. The fact that they are all abandoned is a bit strange to me, though. Every heavy-loaded java appliction that works with database needs connection pooling, right? – Deinlandel Jul 25 '12 at 04:43
  • 1
    Sure, but apparently it's boring and unloved work. BoneCP looked very promising a couple of years ago, but followed the same trend - 2-4 years of intensive work and then boom. – MJB Jul 25 '12 at 04:46
  • 2
    BoneCP development is still on, the last snapshot version came out in Jan. 2013 – Med Mar 21 '13 at 03:08
  • 1
    Also DBCP, C3PO, have all their performance problems (leaks, dead locks, etc.) – bric3 Dec 09 '13 at 13:52
7

You might want to look at https://github.com/brettwooldridge/HikariCP. The speed claims are staggering, but it's new and YMMV.

Emerson Farrugia
  • 11,153
  • 5
  • 43
  • 51
  • springboot 2 prefers Hikari over TomcatJDBC which means that Hikari so these days it is the 'defacto standard' for java microservices in the large organisations that use springboot. – simbo1905 Jun 27 '20 at 04:00
5

Try jdbc-pool http://tomcat.apache.org/tomcat-7.0-doc/jdbc-pool.html bundled with Tomcat 7.

Nitin
  • 51
  • 1
  • 2
5

Here is another connection pool to try, which is fully concurrent and which can handle database outages correctly: http://www.vibur.org/

Simeon Malchev
  • 391
  • 3
  • 11
2

Just would like to point out that BoneCP development has restarted.

wwadge
  • 3,506
  • 1
  • 19
  • 28