Skip to content

Manually registered transaction manager are not recognized by qualifiedBeanOfType [SPR-11915] #16534

@spring-projects-issues

Description

@spring-projects-issues

Michael McCarthy opened SPR-11915 and commented

As per the StackOverflow question above, I've been trying to use an @Transactional annotation with a qualifier, and was hoping that my manually registered singleton bean would get picked up but sadly it doesn't.

If I debug the method public static <T> T qualifiedBeanOfType(BeanFactory beanFactory, Class<T> beanType, String qualifier) and evaluate beanFactory.containsBean(qualifier) in my IDE before the method executes, the result of that evaluation is 'true'.

Unfortunately, qualifiedBeanOfType throws a NoSuchBeanDefinitionException before that fallback method gets a chance to run.

Is it just me or will the fallback never get invoked?


Affects: 3.2.9, 4.0.5

Reference URL: http://stackoverflow.com/questions/24385151/can-i-programatically-add-a-qualifier-to-a-bean?noredirect=1#comment37747172_24385151

Referenced from: commits 67ebef6, b9935e9, 5ed20d2, f8b6114

Backported to: 3.2.10

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)status: backportedAn issue that has been backported to maintenance branchestype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions