Skip Headers

# Connection Pools

Previous

Next

A connection pool is a collection of reusable connections to a single data source.

Note: To simultaneously access multiple databases from within a single session, use a session broker. For more information, see "Session Broker and Client Sessions".

Because creating a data source connection is usually expensive, a properly configured connection pool significantly improves performance.

You can configure your session to use internal connection pools provided by TopLink or external connection pools provided by a JDBC driver or J2EE container. By default, TopLink uses internal connection pools.

Internal connection pools are usually used in non-EJB applications, or when an external transaction controller (JTA) is not used. If you configure your session to use internal connection pools, you can configure its default read and write connection pools. You can create special purpose connection pools for application-specific purposes (named connection pools) or exclusively for sequencing (sequence connection pool). For more information, see "Internal Connection Pools".

External connection pools are usually used in EJB applications and when an external transaction controller (JTA) is used. For more information, see "External Connection Pools".

For more information about data access configuration in general, see "Understanding Data Access".