spring 数据源,事务配置

<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
<property name="driverClassName">
<value>oracle.jdbc.driver.OracleDriver</value>
</property>
<property name="username" value="teamja"></property>
<property name="password" value="teamja"></property>
<property name="url">
<value>jdbc:oracle:thin:@10.4.52.223:1521:orcl</value>
</property>
<property name="maxActive" value="20"></property>
<property name="maxIdle" value="20"></property>
<property name="maxWait" value="1000"></property>
</bean>
<!-- JDBC Transaction handle -->
<bean id="transactionManager"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource" />
</bean>
<!-- JDBC Transaction Proxy   -->
<bean id="proxyTemplate" abstract="true" lazy-init="true" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
<property name="transactionManager">
<ref bean="transactionManager" />
</property>
<property name="transactionAttributes">
<props>
<prop key="do*">PROPAGATION_REQUIRED,-Exception</prop>
<prop key="transaction*">PROPAGATION_REQUIRED,-Exception</prop>
</props>
</property>
<property name="proxyTargetClass">
<value>true</value>
</property>
</bean>
<bean id="archiveBo" parent="proxyTemplate">
<property name="target">
<bean class="main.java.com.neusoft.etems.bo.ArchiveBOImpl">
<property name="archiveDao" ref="archiveDao"></property>
<property name="acceptDao" ref="acceptDao"></property>
</bean>
</property>
</bean>

你可能感兴趣的:(spring,oracle,jdbc)