可通过spring-ldap的ContextSourceAndDataSourceTransactionManager实现。
类路径=org.springframework.ldap.transaction.compensating.manager.ContextSourceAndDataSourceTransactionManager
配置如下:
<!-- 定义spring-ldap事务管理器 -->
<bean id="transactionManager_ContextSourceAndDataSource"
class="org.springframework.ldap.transaction.compensating.manager.ContextSourceAndDataSourceTransactionManager">
<property name="contextSource">
<ref bean="contextSource" />
</property>
<property name="dataSource">
<ref bean="dataSourceOracle" />
</property>
<property name="dataSource">
<ref bean="dataSourceMysql" />
</property>
</bean>
项目代码请到csdn上下载: