I am having two datasource one for oracle and other for postgresql and both are used in same business method . How i can make this bussiness method transactional using spring @transaction
Business method
@Transactional
public int getData(){
oracleDao.func1();
postgreDao.func2();
}
In config i have
<bean id="transactionManagerPostGres" class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="entityManagerFactory"/>
</bean>
<bean id="transactionManagerOracle" class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="entityManagerFactoryOracle"/>
</bean>