Configuring the DB Connection

About this task

Cash Drawer Management uses com.ibm.btt.bc.common.pool.ConnectionPool to manage the database connection. There are two types of connection pool configurations. One uses the datasource which is managed by web container, and the other uses the conventional DBDriver definition. To use the datasource, you should disable the connection pool first, and then provide the jndi datasource for it. To use the DBDriver, you should provide the dbDriverName, dbUrl, dbUserName, dbPassword for the connection pool. Following is a connection pool definition example that use the DBDriver:
<com.ibm.btt.bc.common.pool.ConnectionPoolImpl id="JDBCDAOPool" InitMethod="initialize" DestroyMethod="destroy">
		<com.ibm.btt.bc.common.pool.JdbcConnectionConfig
			Injection="jdbcConfig" dbDriverName="com.ibm.db2.jcc.DB2Driver"
			dbUrl="jdbc:db2:SCHEMA" dbUserName="userName" dbPassWord="password"
			dbAutoCommit="true"/>
		<com.ibm.btt.bc.common.pool.PoolProperty
			Injection="poolProperty" maxActive="10" />
	</com.ibm.btt.bc.common.pool.ConnectionPoolImpl>

For more details, please refer to Connection Pool.Connection Pool