2 Replies Latest reply on Dec 15, 2009 6:14 PM by Pete Muir

    interceptor ordering in beans.xml

    Arbi Sookazian Master

      the interceptor ordering is non-global — it is determined by the order in which interceptors are listed at the class

      source: Weld 1.0.0 ref doc


      so the one of the reasons of specifying this markup is so you can enable/disable interceptors in different envmts and specify the global order of execution.

      is there a way to override this global order for specific classes?  Say there's an exceptional use case that requires (hypothetically) that tx interceptor exec prior to security interceptor.  How would I handle that?  Use @Interceptors and specify as follows?:

      @Interceptors({TransactionInterceptor.class, SecurityInterceptor.class})
      public class ShoppingCart {
      public void checkout() { ... }