分布式事务的处理:
<bean id="dataSourceMysql"
class="com.atomikos.jdbc.AtomikosDataSourceBean" init-method="init"
destroy-method="close">
<property name="uniqueResourceName"
value="${mysql.uniqueResourceName}" />
<property name="xaDataSourceClassName"
value="${mysql.xaDataSourceClassName}" />
<property name="xaProperties">
<props>
<prop key="user">${mysql.user}</prop>
<prop key="password">${mysql.password}</prop>
<prop key="URL">${mysql.url}</prop>
</props>
</property>
<property name="poolSize" value="${mysql.poolSize}" />
</bean>
<bean id="dataSourceOracle"
class="com.atomikos.jdbc.AtomikosDataSourceBean" init-method="init"
destroy-method="close">
<property name="uniqueResourceName"
value="${oracle.uniqueResourceName}" />
<property name="xaDataSourceClassName"
value="${oracle.xaDataSourceClassName}" />
<property name="xaProperties">
<props>
<prop key="user">${oracle.user}</prop>
<prop key="password">${oracle.password}</prop>
<prop key="URL">${oracle.url}</prop>
</props>
</property>
<property name="poolSize" value="${oracle.poolSize}" />
</bean>
项目代码请到csdn下载: