0 Replies Latest reply on Nov 25, 2003 3:20 PM by edubarr

    method and constructor pointcut

    edubarr

      I'm fairly new to JBoss AOP. I'm using the standalone framework and I've encountered some problems with the jboss-aop.xml file.
      I'm trying to do a simple tracing program that only needs to print out the name of the methods, but for some reason my configuration won't work. This is what I have:


      <method-pointcut class="Target" methodName="to.*">



      </method-pointcut>


      According to the examples and documentation it *should* work, but all I get is a whole bunch of exceptions... From what I can see in the exceptions it all boils down to a NullPointerException from AspectXMLLoader.deployXML and then gets passed back to SystemClassLoader.initialize() and .loadClass() and to sun.reflect.NativeMethodAccessImpl.invoke*().

      I've read other posts in the forum, talking about similar problems and I've tried everything, but with no results. The only thing that works is using this:

      <interceptor-pointcut class="test.Target">



      </interceptor-pointcut>

      Along with some class meta-data and a few if statements inside the intercepting class. This is ok for this simple test, but things will get messy once I start to put it to some real use. Is there anything else I could try? Or maybe some different way to initialize the method-pointcut? I've also tried using stack and stack-ref tags and everything gives me errors. Any help or direction will be really appreciated.
      TIA