0 Replies Latest reply on Aug 26, 2010 11:58 AM by marius.bogoevici

    Manipulating interceptor metadata

    marius.bogoevici

      So, for Weld we use an interceptor in order to apply the JSR-299 interceptors (bound using @InterceptorBinding) to EJBs.

       

      The requirement is to invoke those interceptors after the standard EJB 3 interceptors. In order to do that, we try to place the additional interceptor last in the list.

       

      http://anonsvn.jboss.org/repos/jbossas/trunk/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/metadata/WeldEjbInterceptorMetadataDeployer.java

       

      The line that is supposed to do this is:

       

      {code}


            // Add JSR-299 binding interceptor as the last (all others have to be
            // called first)
            interceptorBindings.add(bindingsIBMD);
      {code}

       

      But this doesn't work, as EJB interceptors are actually added after the bindings interceptor. So, what's the right way of actually adding the interceptor on the last position.