Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fast and reliable alternatives to bonecp connection pool

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.

like image 943
Deinlandel Avatar asked Jul 25 '12 04:07

Deinlandel


People also ask

Which connection pool is best?

There are multiple JDBC frameworks for connection pooling the most popular choices being Tomcat JDBC and HikariCP. Whatever framework you choose it's important to configure the properties correctly, (a big plus of HikariCP is that it offers good defaults for optional configs).

Which connection pool is best for spring boot?

Spring Boot uses HikariCP as the default connection pool, due to its remarkable performance and enterprise-ready features.

Which of the following option has the highest priority for creating connection pool?

Database connection pooling is still achieved through application module pooling. The only exception is when multiple application module pools (and therefore a large number of application module instances) share the same database, making the total available database connections the highest priority.

What is a good connection pool size?

For optimal performance, use a pool with eight to 16 connections per node. For example, if you have four nodes configured, then the steady-pool size must be set to 32 and the maximum pool size must be 64. Adjust the Idle Timeout and Pool Resize Quantity values based on monitoring statistics.


2 Answers

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
like image 156
MJB Avatar answered Oct 01 '22 19:10

MJB


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

like image 34
Emerson Farrugia Avatar answered Oct 01 '22 18:10

Emerson Farrugia