What is a connection pool in Java?
Thereof, what is a JDBC connection pool?
A connection pool contains a group of JDBC connections that are created when the connection pool is registered—when starting up WebLogic Server or when deploying the connection pool to a target server or cluster. Connection pools use a JDBC driver to create physical database connections.
Then, what is connection pooling in Java with example?
JDBC Connection Pool Example. Connection pooling is a mechanism to create and maintain a collection of JDBC connection objects. The primary objective of maintaining the pool of connection object is to leverage re-usability and improve the overall performance of the application.
An object pool is a collection of a particular object that an application will create and keep on hand for those situations where creating each instance is expensive. The pool checks instances in and out for users like books out of a library. Usually object pooling is handled by a Java EE application server.