Results 1 to 7 of 7

Thread: SpringBeanAutowiringInterceptor.autowireBean must not throw a checked exception

  1. #1
    Join Date
    Oct 2008
    Posts
    1

    Thumbs down SpringBeanAutowiringInterceptor.autowireBean must not throw a checked exception

    The fix below apparently introduced a new bug:

    Package org.springframework.ejb
    * SpringBeanAutowiringInterceptor calls "InvocationContext.proceed()" in order to invoke subsequent interceptors as well

    ----
    The autowireBean-method in the SpringBeanAutowiringInterceptor apparently throws an Exception. That's not allowed by the spec. An it will not execute in Websphere 7 with Java6.


  2. #2
    Join Date
    Jul 2008
    Location
    Medellín, Colombia
    Posts
    135

    Default

    that's real bad!

  3. #3
    Join Date
    Jun 2009
    Posts
    1

    Default

    I'm getting the same error with Spring 2.5.6 + WebSphere 7. Is this fixed or do you know any workaround?

  4. #4
    Join Date
    Feb 2008
    Posts
    16

    Default

    same issue here...please fix

    while on websphere 7 subject, anyone using @EJB annotation to inject a session bean into a Spring managed POJO? For some reason the jndi name is not found when Spring is trying to inject it..

    Can someone post their working configuration?

  5. #5
    Join Date
    Jul 2009
    Posts
    10

    Default

    There's a Jira issue about this and it says it's closed and will be in spring 3, but no mention of a patch for 2.5

    As an interim fix you can create your own injector implementation, copy the source code from the 2.5 one and just swallow the exceptions (or better yet throw them as run time exceptions)

  6. #6
    Join Date
    Feb 2008
    Posts
    16

    Default

    yeah, already did that and i'm not getting any exceptions, but the interceptor does not get called at all (my beans don't get autowired)

    this might be a websphere 7 specific issue?

    ps: @AroundInvoke does work, but the other annotations don't!!

    Anyone has a good solution for autowiring by using @AroundInvoke? Even though it's a big overhead compared to @PostConstruct

  7. #7
    Join Date
    Jul 2009
    Posts
    10

    Default

    Quote Originally Posted by a3ris View Post
    yeah, already did that and i'm not getting any exceptions, but the interceptor does not get called at all (my beans don't get autowired)
    What specifically is going wrong? Have you tried logging/debugging from within your autowireBean method?

    I had trouble when extending the spring implementation. Creating a completely separate class and copy and pasting the spring source code into it, then modifying worked a lot better.


    The other issue I had was working out how to use @Autowire and @Qualifier("beanName") but that's simple once you know the annotation names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •