0 Replies Latest reply on Jun 17, 2009 4:00 PM by trossmy

    Array of Interceptors?

    trossmy

      As I'm migrating to seam from a spring centric webapp I have to transform quite a lot of aspects into interceptors and the idea of annotating each and every component with 10 or more interceptor annotations seems a bit ugly to me. Is there a way to define an array of interceptors that can be wrapped in a single annotation. I tried something like this:



      @Target(ElementType.TYPE)
      @Retention(java.lang.annotation.RetentionPolicy.RUNTIME)
      @Interceptors({Interceptor1.class,...,InterceptorN.class})
      public @interface InterceptorCollection
      {
      }





      but that produces the following exception:


      java.lang.IllegalArgumentException: Must be exactly one interceptor when used as a meta-annotation
           at org.jboss.seam.intercept.Interceptor.<init>(Interceptor.java:106)