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?

4

2 回答 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.

于 2011-08-04T12:48:09.617 回答
0

问题是,Transactional注解不允许你指定一个事务管理器,一个事务管理器只能管理一个DataSource。但是有一种方法可以通过使用 JTA 和JTOM来做到这一点,看看你怎么能在这里做到这一点

于 2011-08-04T13:11:30.797 回答