Datasource connection pooling property
In customer_overrides.properties
, you
can define an external datasource on your application server to manage
connection pooling for your database.
To define an external datasource:
<property_file_descriptor>.<database>Pool.datasource=<datasource_name>
For example:
jdbcService.db2Pool.datasource=db2_transaction_pool
In this example:
jdbcService
is the property file descriptor.db2
is the name of the database you are using with your application.db2_transaction_pool
is the name of the datasource that you want to use to manage database connection pooling. You defined this in the application server.
Note: To use an application server datasource, you must also set the
-Dvendor
parameter to websphere
, or weblogic
in
the application server script file.The following are DB Pooling properties and descriptions.
- Property
- Description
- <property_file_descriptor>.<database>Pool.initsize
- Initial size of the database pool. This is the minimum number of database
connections to keep in the pool.
Example: jdbcService.oraclePool.initsize=4
- <property_file_descriptor>.<database>Pool.maxsize
- Maximum size of the database pool. This is the maximum number of database
connections to keep in the pool.
Example: jdbcService.oraclePool.maxsize=10
- <property_file_descriptor>.<database>Pool.buffersize
- Number of extra connections that the connection pool can create above the value
specified for <database>Pool.maxsize to improve handling of unanticipated loads on the system.
Example: jdbcService.oraclePool.buffersize=500
Note: This property is only used if <database>Pool.behaviour is set to 2. - <property_file_descriptor>.<database>Pool.idletimeout
- Number of milliseconds a connection can stay idle in a
given pool before it needs to be removed.
Example: jdbcService.oraclePool.idletimeout=86400000
- <property_file_descriptor>.<database>.default.testOnReserve
- Specifies whether the connection pooling software
should test the database connection in the pool before allowing other parts of the software to use
it.
Example: If the value is set to true(default) then, the property will test the database connection and revive idle connections.
If the value of the property is set to false, then, the property will not test the database connection.