0

I need to use two different dataSources/transactionManagers for different methods. The concept with @Transaction(value="txManagerABC") and a defined qualifier in the applicationContext for the transaction manager is perfect. (As seen in Spring multiple @Transactional datasources)

Unfortunately I need to do the same thing with Spring 2.5. Does anyone have an idea how to solve this?

2 Answers 2

1

I believe the recommended way would be to fall back to XML transaction aspect configuration. If you really want annotations, you could probably make some modifications to the @Transactional annotation and surrounding infrastructure to make it work. Or you could update to Spring 3. There is very little to no compatibility issue between 2.5 and 3.

0

The problem is, the Transactional annotation does not let you specify a transaction manager , and one transaction manager can only manage one DataSource. but There's a way to do so by using JTA and JTOM , see how you can do it here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.