I have 2 databases (MySql and HSQLDB). I configured 2 data sources and 2 EntityManagerFactory beans. I can also configure 2 correspondent JpaTransactionManager beans.
Declare your
without transaction-manager attribute, declare qualifiers for transaction managers like this:
Use this qualifier in @Transactional as a value to select one of transaction managers:
@Transactional("txManager1")
or, with more properties:
@Transactional(value = "txManager1", readOnly = true)