-
Jul 13th, 2009, 11:33 PM
#1
SpringBeanAutowiringInterceptor autowire by name?
I've finally gotten SpringBeanAutowiringInterceptor close to working under spring 2.5 on websphere 6.1 (ejb3 feature pack) but now I'm having trouble because we have multiple beans of the same type with different configurations.
The best solution for this that I can think of is to have spring auto wire the beans using the name of the variable it's trying to set rather than the type.
I've been reading through documents and can see that this sort of thing is done by spring in a lot of places, but I can't find how to set it up as the default behavior from within the interceptor.
-
Jul 14th, 2009, 12:27 AM
#2
Just found my answer in the spring docs.
@Qualifier("beanName") achieves my goal.
There's a note about not using @Autowire and @Qualifier, but using @Resource instead, however I'm concerned that will mess with the ejb3 injection that happens before spring.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules