-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Description
Alexander Imfeld opened SPR-12606 and commented
When using multiple TransactionManagers and declarative transaction management with @Transactional (with and w/o qualifier) and @EnableTransactionManagement, the TransactionInterceptor will lookup and store the default transaction manager in TransactionAspectSupport#determineTransactionManager in case there is no qualifier. This TransactionManager will then also be used in case there actually is a qualifier (as soon as a transactionManager is set it in determineTransactionManager, it will be used for all further calls).
Seems to me it's not possible to have multiple TransactionManagers (e.g. 'transactionManager' and 'anotherTransactionManager) and mix qualified with non-qualified Transactional annotations (e.g. @Transactional and @Transactional("anotherTransactionManager"))
Shouldn't qualifier based TransactionManager lookup be the primary mechanism to determine the TransactionManager in TransactionAspectSupport?
Affects: 4.1.3
Issue Links:
- DATAJPA-657 TransactionManager reference is ignored when using Spring 4.1.4
- @Transactional qualifier is ignored by TransactionAspectSupport if default transaction manager is set [SPR-12541] #17145
@Transactionalqualifier is ignored by TransactionAspectSupport if default transaction manager is set - Regression in TransactionAspectSupport.determineTransactionManager(…) [SPR-12577] #17178 Regression in TransactionAspectSupport.determineTransactionManager(…)