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?

Community
  • 1
  • 1
cloudnaut
  • 982
  • 3
  • 13
  • 35

2 Answers2

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.

Ryan Stewart
  • 126,015
  • 21
  • 180
  • 199
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

Mouna Cheikhna
  • 38,870
  • 10
  • 48
  • 69