7 Replies Latest reply on Nov 28, 2013 11:41 PM by Miguel Angel Lemus

    could I bind interceptors via pointcut in JBoss 7.x like in older versions?

    Henrik Hoffmann Newbie

      Hi,

      currently im migrating my Application from AS 5.1 to AS 7.2.0 (in general several maven projects containing many local and remote SLSB, some MDB, some Singleton-Beans --> standard EJB Stuff deployed in an ear)

       

      After managing some EJB3 --> EJB 3.1 issues now i wanted to migrate my interceptors.

      I have several interceptors but lets have a look at my logging interceptor. This interceptor should log method entry and exit of every public method in remote ejb's.

       

      In AS 5.1 i realized that by insert some pointcuts in the ejb3-interceptors-aop.xml file.

         <domain name="Stateless Bean" extends="Intercepted Bean" inheritBindings="true">
            <!-- some standard ejb stuff -->
      
            <bind pointcut="execution(public * @javax.ejb.Remote->*(..)) AND execution(public * de.mycompany.myapp.mymodule.server.*->*(..))">
              <stack-ref name="MyEJBInterceptors"/>
            </bind>
      
           <!-- some standard ejb stuff -->    
      
         </domain>
      
      

       

       

       

      Now i'm searching for a solution to do the same configuration on AS 7.2

       

      At the momement i have no idea and hope someone could help me please.

      Additionaly i have to say that for me is not a good way to annotate all RemoteBeans wiith @Interceptor

      There must be a way to bind the interceptor generally without the danger to forget one bean and have to recompile the whole ear.

       

      may someone has an advice?

      thank you