Business components : Business components : Supporting components : Connection Pool : Tasks
  
Tasks
See also
Configuring the connection pool using JDBC Driver
Configuring the connection pool using data source
Connection Pool
Configuring the connection pool using JDBC Driver
In the client environment without data source support, to configure a connection pool that use JDBC DB Driver directly, you should provide the dbDriverName, dbUrl, dbUserName, dbPassword for connection pool.
The following is a connection pool configuration example that uses JDBC Driver.
<com.ibm.btt.bc.common.pool.ConnectionPoolImpl id="JDBCDAOPool" >
<com.ibm.btt.bc.common.pool.JdbcConnectionConfig Injection="jdbcConfig"
dbDriverName="COM.ibm.db2.jdbc.app.DB2Driver" dbUrl="jdbc:db2:journal鈥?>
<com.ibm.btt.bc.common.pool.PoolProperty Injection="poolProperty" maxActive="10" />
</com.ibm.btt.bc.common.pool.ConnectionPoolImpl>
Attribute descriptions for JdbcConnectionConfig
dbDriverName
Specifies the Driver name for DB connection.
dbUrl
Specifies the URL for DB connection.
dbUserName
Specifies the user name that used to log in the DB.
dbPassword
Specifies the password of the user who want to log in DB.
dbAutoCommit
To set the AutoCommit attribute of the DB connection. The default value is true.
Pool properties
Besides the JDBC parameters, you should also set the pool properties; otherwise the default pool properties will be used.
maxActive
Maximum number of connection that can be borrowed from the pool at one time. When non-positive, there is no limitation.
Default value: 8
maxIdle
Maximum number of connection that can sit idle in the pool at any time.
Default value: 8
minIdle
Minimum number of connection that can sit idle in the pool at any time.
Default value: 0
maxWait
Maximum wait on time (in millisecond) when borrow a connection from pool. Non-positive means wait on until the connection is obtained.
Default value: -1
See also
Tasks
Configuring the connection pool using data source
In WAS managed environment, data source can be used directly. The configuration only needs a little change in this case. The dataSource attribute is used instead of attributes of JDBC drivers. The pooling function of the UDTT connection pool can be disabled by the disablePool attribute. If disablePool is set to true, the pooling function of data source is used directly instead of the UDTT connection pool.
<com.ibm.btt.bc.common.pool.ConnectionPoolImpl id="JDBCDAOPool" disablePool="true">
<com.ibm.btt.bc.common.pool.JdbcConnectionConfig Injection="jdbcConfig" dataSource="jdbc/BTTEJ" />
</com.ibm.btt.bc.common.pool.ConnectionPoolImpl>
Note If the dataSource attribute and JDBC Driver attributes are set at same time, the JDBC Driver attributes are ignored, and the dataSource attribute is used.
See also
Tasks