I have some insert operations under the database "A". Next, I have an operation with the database "A" which connect with the database "B" using Oracle DB Link to update into the second one. When the method execution finish, all the operations over the database "A" are persisted, but the operation over the database "B" doesn't exist.
I'm using Spring 3.2.3.RELEASE and MyBatis 3.2.3
My applicationContext.xml:
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource" />
</bean>
<tx:advice id="txAdvice" transaction-manager="transactionManager">
<tx:attributes>
<tx:method name="get*" read-only="true" />
<tx:method name="*" />
</tx:attributes>
</tx:advice>
<aop:config proxy-target-class="false">
<aop:pointcut id="businessEbOperation" expression="bean(*BO)" />
<aop:advisor advice-ref="txAdvice" pointcut-ref="businessEbOperation" />
</aop:config>
<!-- define the SqlSessionFactory -->
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="typeAliasesPackage" value="com.foo.core.entities" />
<property name="configLocation" value="classpath:mybatis-config.xml" />
</bean>
<!-- Oracle 10g DataSource -->
<bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName">
<value>java:/OracleDS</value>
</property>
</bean>
Thanks in advance!