I have @Transactional annotation in all my DAOs, but I can only define one TransactionManager that takes only one SessionFactory. I have one SessionFactory per customer, one DataSource per customer and apparently I need to change TransactionManager for every customer. But how can I get correct transaction manager for customer, when I can only define one Spring bean name for one TransactionManager?
Spring 3 has support for multiple transaction managers, while keeping the declarative @Transactional delimitation
http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/transaction.html#tx-multiple-tx-mgrs-with-attransactional
Is this not what you want?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With