2 Replies Latest reply on Apr 11, 2007 10:43 AM by asack

    Interceptors broken?

    asack

      I have the following:

      @Stateless
      public class SomeSLSB {
      @Interceptors(SomeInterceptorA.class)
      public someMethod()
      someOtherMethod()


      @Interceptors(SomeInterceptorB.class)
      public someOtherMethod()
      }

      Can someone please tell me with 404GA why when I call someMethod() interceptor A gets called but not B. It seems someOtherMethod() does get called but the interceptor around it is not triggered. Are interceptors only triggered from my SLSBs local interface? It seems by spec, both interceptors should be called and they are certainly not!

      Little help? I can give more specific examples if the above isn't clear but this seems like a real bug.

        • 1. Re: Interceptors broken?
          bdecoste

          Interceptors are only triggered if the call goes through the ejb container. If you make a call from within a bean to another of the bean's methods, it's a simple java invocation - the call does not go through the container and is not intercepted.

          • 2. Re: Interceptors broken?
            asack

             

            "bdecoste" wrote:
            Interceptors are only triggered if the call goes through the ejb container. If you make a call from within a bean to another of the bean's methods, it's a simple java invocation - the call does not go through the container and is not intercepted. [/quote

            Which is a bug no (according to spec?)?