Results 1 to 2 of 2

Thread: SpringBeanAutowiringInterceptor autowire by name?

  1. #1
    Join Date
    Jul 2009
    Posts
    10

    Question 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. #2
    Join Date
    Jul 2009
    Posts
    10

    Default

    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
  •