Announcement Announcement Module
Collapse
No announcement yet.
SpringBeanAutowiringInterceptor autowire by name? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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.

  • #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.

    Comment

    Working...
    X