Years ago the
Tomcat JDBC Connection Pool library was developed as an alternative for highly-threaded environments because of weaknesses in the
Apache Commons DBCP. Now I see that a new version (DBCP2) has been built using a new version 2 of
Apache Commons Pool, another library specially built to support implementing various object-pooling projects.
There are some other libraries, but I don't know their current state:
My own priorities are:
- Proper JDBC behavior
- Reliability (robust in a highly-threaded environment)
- Easy to install & manage
- Simple, minimal tuning required for general usage
Hyper-speed, such a being good at benchmark testing, is not important. Tolerating rapid turnover of briefly-used connections in likely contention within a highly-threaded environment is my only performance concern.
JMX or other runtime-management/supervision access is a bonus.
I'm currently using the
Tomcat JDBC Connection Pool with Tomcat 8 and Postgres on Java 8 with no problems. I'm just wondering if that is still the best option. The reviews I’ve found by googling seem to be quite a few years old. I am not using Hibernate or any other object-relational mapper (ORM) nor JPA technology; I just hand-write SQL code in JDBC.
What is a good JDBC connection pool library for my needs?