Skip to content

Wrong TransactionManager selected when mixing @Transactional with and w/o qualifier [SPR-12606] #17207

@spring-projects-issues

Description

@spring-projects-issues

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:

Metadata

Metadata

Assignees

Labels

in: dataIssues in data modules (jdbc, orm, oxm, tx)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions