1 Reply Latest reply on Sep 24, 2008 12:30 PM by Kabir Khan

    New AOP deployers almost ready

    Kabir Khan Master

      I have almost completed the new AOP deployers. The aim was to install the AOP artifacts via MC beans rather than directly into the aspect manager as was the case previously. Locally, with my changes here I am able to get the full AOP testsuite passing. I have yet to try out ejb3-interceptors-aop.xml, which I will look at on Monday.

      Before I can upgrade AS trunk I need to do another AOP release, then we need a release of MC (aop-mc-int). Once upgraded in AS, and switched over to use the new deployers the following two things apply to all jboss-aop.xml files used in AS

      1) The aop namespace must be defined, so the contents of the file must be as follows:

      <?xml version="1.0" encoding="UTF-8"?>
      <aop xmlns="urn:jboss:aop-beans:1.0">
      ...
      </aop>
      


      2) interceptors can only be defined at the top level. We don't support:
      <?xml version="1.0" encoding="UTF-8"?>
      <aop xmlns="urn:jboss:aop-beans:1.0">
       <bind pointcut="all(@Test1)">
       <interceptor class="MyInterceptor"/>
       </bind>
       <bind pointcut="all(@Test2)">
       <interceptor class="MyInterceptor"/>
       </bind>
      </aop>
      


      instead you must use the alternative syntax (which is similar to how aspects/advice-bindings work)
      <?xml version="1.0" encoding="UTF-8"?>
      <aop xmlns="urn:jboss:aop-beans:1.0">
       <interceptor class="MyInterceptor"/>
       <bind pointcut="all(@Test1)">
       <interceptor-ref name="MyInterceptor"/>
       </bind>
       <bind pointcut="all(@Test2)">
       <interceptor-ref name="MyInterceptor"/>
       </bind>
      </aop>