使用JOTM做数据库连接池

	 <bean id="jotm" class="org.springframework.transaction.jta.JotmFactoryBean"/>

	 <bean id="jtaTransactionManager" class="org.springframework.transaction.jta.JtaTransactionManager">
	   <property name="userTransaction" ref="jotm"/>
	 </bean>

	 <bean id="innerDataSource" class="org.enhydra.jdbc.standard.StandardXADataSource" destroy-method="shutdown">
	   <property name="transactionManager" ref="jotm"/>
	   <property name="driverName" value="oracle.jdbc.driver.OracleDriver"/>
	   <property name="url" value="jdbc:oracle:thin:@172.0.0.1:1521:jotm"/>
	 </bean>

	 <bean id="jtaDataSource" class="org.enhydra.jdbc.pool.StandardXAPoolDataSource" destroy-method="shutdown">
	   <property name="dataSource" ref="innerDataSource"/>
	   <property name="user" value="test"/>
	   <property name="password" value="test"/>
	 </bean>

你可能感兴趣的:(数据库连接池)