Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression in TransactionAspectSupport.determineTransactionManager(…) [SPR-12577] #17178

spring-projects-issues opened this issue Dec 30, 2014 · 1 comment


Copy link

@spring-projects-issues spring-projects-issues commented Dec 30, 2014

Oliver Drotbohm opened SPR-12577 and commented

If multiple PlatformTransactionManager beans are registered in an ApplicationContext, a raw @Transactional declaration should use the transaction manager bean that is determined via TransactionAspectSupport.transactionManagerBeanName. The changes for #17145 now completely ignore that property as the TransactionAttribute.getQualifier() is mistakenly compared to null. A not set qualifier will result in an empty String for annotation based TransactionAttributeSource instances so that the else clause can never be reached when using @Transactional and thus the configured bean name gets ignored. This subsequently leads to a NoUniqueBeanDefinitionException due to the by-type lookup returning two candidate beans.

Affects: 4.1.4

Issue Links:

  • DATAJPA-657 TransactionManager reference is ignored when using Spring 4.1.4 ("is depended on by")
  • #17145 @Transactional qualifier is ignored by TransactionAspectSupport if default transaction manager is set
  • #17185 Core interceptors overhaul
  • #17207 Wrong TransactionManager selected when mixing @Transactional with and w/o qualifier

0 votes, 6 watchers

Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Dec 31, 2014

Stéphane Nicoll commented

Proper behaviour has been restored with an explicit test about it. The repro project now works fine on all use cases.

I have also created #17185 to review that qualifier/cache logic in more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants