Skip to content

SPR-14706 - add setTransactionManagerBeanName#1161

Closed
qxo wants to merge 2 commits intospring-projects:masterfrom
qxo:qxo-patch-setTransactionManagerBeanName
Closed

SPR-14706 - add setTransactionManagerBeanName#1161
qxo wants to merge 2 commits intospring-projects:masterfrom
qxo:qxo-patch-setTransactionManagerBeanName

Conversation

@qxo
Copy link
Contributor

@qxo qxo commented Sep 7, 2016

add setTransactionManagerBeanName for set TransactionAspectSupport#setTransactionManagerBeanName

so one beanfactory can have more than one TransactionManager
otherwise will:

org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [org.springframework.transaction.PlatformTransactionManager] is defined: expected single matching bean but found 2: transactionManagerLog,transactionManager
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:368)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:371)

add setTransactionManagerBeanName for set TransactionAspectSupport#setTransactionManagerBeanName

so one beanfactory can have more than one TransactionManager 
otherwise will:
`
org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [org.springframework.transaction.PlatformTransactionManager] is defined: expected single matching bean but found 2: transactionManagerLog,transactionManager
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:368)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:371)
`
@pivotal-issuemaster
Copy link

@qxo Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@pivotal-issuemaster
Copy link

@qxo Thank you for signing the Contributor License Agreement!

@snicoll
Copy link
Member

snicoll commented Sep 11, 2016

@qxo please create a jira issue and describe the issue (preferably with a sample). Thanks.

qxo added a commit to qxo/spring-pull-1661-test that referenced this pull request Sep 13, 2016
@qxo
Copy link
Contributor Author

qxo commented Sep 13, 2016

jira issue: https://jira.spring.io/browse/SPR-14706

sample code: https://github.com/qxo/spring-pull-1661-test

mvn test will see bug!

@qxo qxo closed this Sep 13, 2016
@qxo qxo reopened this Sep 13, 2016
@snicoll snicoll changed the title add setTransactionManagerBeanName SPR-14706 - add setTransactionManagerBeanName Sep 13, 2016
@snicoll snicoll closed this Sep 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants