3 Replies Latest reply on Jul 12, 2004 4:50 PM by bill.burke

    Another issue...

      Hi again,

      Although I have other issues with jboss-aop, I'm trying to achieve other tests.
      I've precompiled some classes and all is right, but when I execute them there is
      no effect with my interceptions. I got not result.

      This is my test:

      jboss-aop.xml:

      <?xml version="1.0" encoding="UTF-8"?>






      Interceptor implementation:

      public class MethodAuthorizationInterceptor implements Interceptor {
      private static final Logger LOG = Logger.getLogger("es.test.aop");

      public String getName() {
      return getClass().getName();
      }

      public Object invoke(Invocation invocation) throws Throwable {
      MethodInvocation mInvocation = (MethodInvocation) invocation;
      String method = mInvocation.getMethod().getName();
      LOG.info("Interceptado el metodo - " + method);
      return invocation.invokeNext();
      }
      }

      When a class of es.test.support.commands is executed, I've nothing at log.
      There's no error when I run aopc. Have I missed some system property?

      My environment is:

      Tomcat 5.0.24, J2SDK 1.4.2_04, JBossAOP-1.0beta3

        • 1. Re: jboss-aop.xml don't appeared...

          < aop >
          < bind pointcut="execution(public * es.bancoval.bfci18n.support.commands.*->*(..))"/ >
          < interceptor class="es.bancoval.bfci18n.aop.MethodAuthorizationInterceptor"/ >
          < /bind >
          < /aop >

          • 2. Re: Another issue...

            Well, I've got it works but I need to set the system variable:
            -Djboss.aop.path=/home/eduardotp/Aplicaciones/jakarta-tomcat/webapps/multi/WEB-INF/classes/jboss-aop.xml










            • 3. Re: Another issue...
              bill.burke

              Since you are not running within JBoss you need to use System properties to tell JBoss AOP how to resolve XML files to be deployed.

              Please see our WIKI for more information