@EnableTransactionManagement annotation with 2 transaction managers
In your configuration class, use @EnableTransactionManagement annotation. Define a transaction manager in this class as: @Bean(name=”txName”) public HibernateTransactionManager txName() throws IOException{ HibernateTransactionManager txName= new HibernateTransactionManager(); txName.setSessionFactory(…); txName.setDataSource(…); return txName; } There on, in your class/method that executes transactional job(s), annotate as follows: @Transactional(“txName”) or @Transactional(value = “txName”) This is how you would tie a name … Read more