An Enterprise Application needs to handle hundreds of users accessing the application at the same time, as such one would need equal number of database connections one per transaction. Creating a new connection for per transaction can be time consuming, uses more bandwidth and memory, so it desirable to have a Connection Pool, from there the transaction can borrow, do its work and return back to pool, essentially share the connection cutting down creation time and memory footprint.
Apache DBCP (Database Connection Pooling) framework provides a this basic features and lot more. The pool manager can also make sure the connection in the pool are good, recycle bad connection by executing a test query etc. It can also provide information about Connection Pool Leak if any caused by not properly return connection back to the pool.
This project is part of Apache Commons and is used by a variety of Apache projects. This module can be used to build connection pool to any database as long as it supports JDBC. Also currently there are 2 different version of this libraries, one that support JDBC 3 and other that supports JDBC 4, so depending on the version you are using, select the correct one.
It is a very robust, feature rich yet simple API all packaged into a single libraries with few other Apache dependencies. It provides a lot pool configuration options that can set via properties or programmatically via API.
Go to DBCP Home[pb_builder]