Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java Database connection pool (BoneCP vs DBPool vs c3p0)

Tags:

For a Java app outside of a J2EE container, which connection pool library is the best?

  • I heard c3p0 is getting outdated.
  • Jakarta's common pool library is no longer under development

Therefore I'm left with BoneCP and DBPool. From what I can tell both have limited activity. The main difference I can see is performance, which BoneCP seems to win out with. However the documentation is pretty weak.

Which database pool library have you used in the real world and why? What was the good and bad?

like image 465
Stephane Grenier Avatar asked Nov 08 '11 21:11

Stephane Grenier


People also ask

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 is best connection pool for hibernate?

Hibernate will use its org. hibernate. connection. C3P0ConnectionProvider for connection pooling if you set hibernate.

What is c3p0 connection pool?

c3p0 is a Java library that provides a convenient way for managing database connections. In short, it achieves this by creating a pool of connections. It also effectively handles the cleanup of Statements and ResultSets after use.

Which 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.


1 Answers

At work we have used BoneCP (as the replacement for c3p0) and as far as I know haven't had any issues (I did not do the upgrade myself). From what I have seen and read it seems like a well-designed solid library, and I would personally use it over alternatives: it appears to be one of those "just works" libraries that are nice to have around.

Nothing negative to say about DBPool, I am just not familiar enough with it; although looking at its site documentation certainly seems like a plus.

like image 69
StaxMan Avatar answered Oct 23 '22 19:10

StaxMan