Configuring connection pooling for database connections

You can configure connection pooling for your data source by defining a connection manager for it.

Example

The following example code uses the connectionManager element in the server.xml file to define a connection pool for a data source:
<dataSource id="ds1" jndiName="jdbc/example" jdbcDriverRef="DB2" >
  <connectionManager maxPoolSize="10" minPoolSize="2" />
</dataSource>

The server uses default values for any connection management settings that are not defined on the connection manager element. If a connection manager is not defined at all for a data source, the server uses default values for all of the settings.

Using thread local storage for connections can increase performance for applications on multi-threaded systems. See Tuning the Liberty profile.

You can define multiple data sources and associate each with a different connection manager. However, you cannot associate multiple data sources with a single connection manager.

For more information about the connectionManager element, see Liberty profile: Configuration elements in the server.xml file.


Icon that indicates the type of topic Task topic

Terms and conditions for information centers | Feedback


Timestamp icon Last updated: Monday, 21 April 2014
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=phil&product=was-express-iseries&topic=twlp_conn_pool
File name: twlp_conn_pool.html