This configuration is based on BTT elementary. The fileDirectory field is the path of the four XML files which are necessary for XML DAO. The following is the sample code for configuring XML DAO. It should be configured according to the real environment.
<branch001.xml> <com.ibm.btt.bc.ac.impl.BTTSecurityManager id="securityManager"> <ref Injection="securityObjectManager" refId="securityObjectManager" /> </com.ibm.btt.bc.ac.impl.BTTSecurityManager> <com.ibm.btt.bc.ac.impl.SecurityObjectManager id="securityObjectManager"> <ref Injection="daoFactory" refId="xmlDAOFactory" /> </com.ibm.btt.bc.ac.impl.SecurityObjectManager> <com.ibm.btt.bc.ac.dao.xml.XMLDAOFactory id="xmlDAOFactory" fileDirectory="/xmldb" /> <com.ibm.btt.bc.ac.DefaultPasswordPolicy id="passwordPolicy" /> </branch001.xml>
This configuration is based on BTT elementary. For more details, please refer to Connection Pool. It 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 defined in 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.
<branch001.xml> <com.ibm.btt.element.impl.LifeCycleProcessorImpl id="lifeCycleProcessor" defaultInitMethod="initialize" defaultDestroyMethod="destroy" /> <com.ibm.btt.bc.ac.DefaultPasswordPolicy id="passwordPolicy" /> <com.ibm.btt.bc.ac.impl.BTTSecurityManager id="securityManager"> <ref Injection="securityObjectManager" refId="securityObjectManager" /> </com.ibm.btt.bc.ac.impl.BTTSecurityManager> <com.ibm.btt.bc.ac.impl.SecurityObjectManager id="securityObjectManager"> <ref Injection="daoFactory" refId="db2DAOFactory" /> </com.ibm.btt.bc.ac.impl.SecurityObjectManager> <com.ibm.btt.bc.ac.dao.db.DBDAOFactory id="dbDAOFactory" dbSchema="db2inst1"> <ref Injection="connectionPool" refId="JDBCDAOPool" /> </com.ibm.btt.bc.ac.dao.db.DBDAOFactory> <com.ibm.btt.bc.common.pool.ConnectionPoolImpl id="JDBCDAOPool"> <com.ibm.btt.bc.common.pool.JdbcConnectionConfig Injection="jdbcConfig" dbDriverName="com.ibm.db2.jcc.DB2Driver" dbUrl="jdbc:db2://hostname:50000/BTTDB" dbUserName="db2inst1" dbPassWord="db2inst1" dbAutoCommit="true" /> <com.ibm.btt.bc.common.pool.PoolProperty Injection="poolProperty" maxActive="10" /> </com.ibm.btt.bc.common.pool.ConnectionPoolImpl> </branch001.xml>