I have 2 databases (MySql and HSQLDB). I configured 2 data sources and 2 EntityManagerFactory beans. I can also configure 2 correspondent JpaTransactionManager beans.
But I don't know how to specify which of them should be used to manage transactions for concrete service-class. I want to use @Transactional
annotation for that purpose, but I actually can specify only one of txManagers:
<tx:annotation-driven transaction-manager="manager"/>
What is the way out from this situation?