-
Notifications
You must be signed in to change notification settings - Fork 38.6k
Description
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")
- @Transactional qualifier is ignored by TransactionAspectSupport if default transaction manager is set [SPR-12541] #17145
@Transactional
qualifier is ignored by TransactionAspectSupport if default transaction manager is set - Core interceptors overhaul [SPR-12584] #17185 Core interceptors overhaul
- Wrong TransactionManager selected when mixing @Transactional with and w/o qualifier [SPR-12606] #17207 Wrong TransactionManager selected when mixing
@Transactional
with and w/o qualifier
0 votes, 6 watchers