Le 24/05/2011 15:37, Bernhard Berger a écrit :
Hi,I have some problems with instrumenting a java enterprise application, which perhaps is not a AspectJ issue. Maybe someone of you can help me. Currently I'm trying to trace an enterprise application deployed to a JBoss 4 server. My idea is to add a trace aspect to every call within a certain package to extract a run-time call-graph. I have implemented a small aspect and created a pointcut matching all classes: pointcut myMethodCalls(): within(com.example.*)&& call(* *(..)); The aspect snippets call a tracer class before and after the call: before() : myMethodCalls() { TraceMonitor.enterMethod(thisJoinPoint, thisEnclosingJoinPointStaticPart); } after() : myMethodCalls() { TraceMonitor.leaveMethod(thisJoinPoint); } When instrumenting a commandline application, everything is working fine and I receive the result I expect. But when I copy this to JBoss the aspect is not added to the classes. BTW: I'm using LTW because I want AspectJ to add the aspect to all classes (even to the one that are generated at runtime). The only result I can see are tons of log messages like this: [2@63cd66ea] info AspectJ Weaver Version 1.6.11 built on Tuesday Mar 15, 2011 at 15:31:04 GMT [2@63cd66ea] info register classloader org.jboss.mx.util.MBeanProxyExt $2@63cd66ea [2@63cd66ea] info using configuration /C:/test/bin/aop.xml [2@63cd66ea] info register aspect de.uni_bremen.st.berber.aspectj.Trace which shows me that AspectJ is running but the fact that the classes are not instrumented shows me, that I missed something. Perhaps some configuration settings for JBoss. Can someone give me a hint? Thanks in advance Bernhard
I suppose that the file /C:/test/bin/aop.xml declares the aspect. turn on verbose mode in aop.xml
Other way, JBoss has its own AOP weaver, => javassist . Perhaps a precedence between aspectj and javassist
_______________________________________________ aspectj-users mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/aspectj-users
