[jboss-user] [JBoss AOP] - How test aop in junit testcase in Eclipse (loadtime weaving)

afloom do-not-reply at jboss.com
Fri Sep 28 04:32:31 EDT 2007


I'm trying to get a junit testcase running with my aop interceptors. As I understand that the AOP IDE is very outdated I'm trying to configure Eclipse to do this myself. I'm trying ot get this working with loadtime weaving so that no special compilation is needed, which (I think) would simplify development. I'm not using ant either, but Maven.

What I've done is that I have a Eclipse project with my interceptors, my jboss-aop.xml and a jUnit (3) test case. Everything in standard maven structure.
I'm trying to run my test case by creating my own JUnit run configuration in Eclipse. (Right click on the test case class and choose Run As...->Run.) I've configured the -javaagent VM argument (-javaagent:${project_loc}/jbossaop-lib/jboss-aop-jdk50.jar) and I've also added the jar files needed to the classpath.
However, the interceptor is not run. The jboss-aop.xml file is being read, because if I introduce some syntax error in it I get an error message.

Anyone doing something like this and can help me? I understand it's difficult to say what the problem is but maybe you have some ideas where I should start looking? How should i troubleshoot this?

/Anders


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4089591#4089591

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4089591



More information about the jboss-user mailing list