1 Reply Latest reply on May 5, 2011 5:22 AM by wdfink

    Use of @Interceptors as meta-annotation

    mikes74

      Hi all,

       

      I'm trying to use @Interceptors as meta-annotation by defining my own annotation for a security check.

      A similar example is explained here:

       

      http://docs.redhat.com/docs/en-US/JBoss_Enterprise_Web_Platform/5/html/Seam_Reference_Guide/ch07s11.html

       

      I do NOT using Seam. My annotation looks like

       

      @Target(TYPE)

      @Retention(RUNTIME)

      @Interceptors(LoggedInInterceptor.class)

          public @interface LoggedIn {}

       

      By applying this annotation on a SLSB (class level) the defined "LoggedInInterceptor.class" is not called ..

      What's going wrong here ???

       

      Mike

        • 1. Use of @Interceptors as meta-annotation
          wdfink

          The example is from Seam and you do not use it.

           

          If you add @Interceptors(LoggedInInterceptor.class) to your @Stateless implementation and write the Interceptor class like the LoggedInInterceptor example it would work.

          You do not need your own annotation because it will not interpreted by the EJB invoker.