2 Replies Latest reply on Sep 21, 2009 4:37 AM by surfingspider

    Interceptors not set up right...

    surfingspider

      Hi guys,


      I'm trying to get some method interceptors working which check the object type of a method arg and throw an exception if that object isn't a supported one.


      The annotated class is:


      public class X
      {
       @Interceptors(ParamInterceptor.class)
       public void doX(Object o) {...}
      }
      



      The interceptor is:


      @Interceptor
      public class ParamInterceptor
      {
        @AroundInvoke
        public Object checkParameter(InvocationContext invocation) throws Exception {...}
      }
      



      Now obviously the interceptor isn't being called. I've seen more annotations on the class declaring interceptors in the documentation (public class X in my case) but they seemed to imply class level where as I just want annotated methods, and mayhaps have different interceptors the class.


      I'm doing something wrong or leaving stuff out. Thanks for help in advance.