1 Reply Latest reply on Jan 30, 2006 4:54 PM by Bill Burke

    Method level interceptor not being called

    Eric De Prez Newbie

      Hello,
      While toying with interceptors I constated that my method level interceptors were not called if no class level interceptor is defined.
      So this doesn't work:

      @Stateless
      @Remote(TestStateless.class)
      public class TestStatelessBean implements TestStateless {
      
       @EJB
       private EJBSec secBean;
      
       @Interceptors({TracingInterceptor.class})
       public String callMe(int x) {
       System.out.println("some test: " + x);
       return "tata " + secBean.sayHello("one!");
       }
      
      
       @Interceptors({TracingInterceptor.class})
       public void callMeToo(int x) {
       System.out.println("call me too");
      
       }
      }

      But just add a class level interceptor and the method ones are called.
      I quickly scanned the specs and I don't think this is intended behaviour... is it?

      I'm using jboss-EJB-3.0_RC4-PFD.

      Eric.