For a Java app outside of a J2EE container, which connection pool library is the best?
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?
Spring Boot uses HikariCP as the default connection pool, due to its remarkable performance and enterprise-ready features.
Hibernate will use its org. hibernate. connection. C3P0ConnectionProvider for connection pooling if you set hibernate.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With