3 Replies Latest reply: Apr 28, 2011 3:39 PM by Ales Justin RSS

JBoss AS 6 and AspectJ load time weaving

Tino Sainz Newbie

Hello,

 

I've got a little aspect which helps "me" to monitor applications (hibernate querys).

 

Its written in aspectj and i would like to avoid JBoss AOP (altho i guess i'll have to port it.. to make it work...)

 

Im trying to make it work with JBoss AS 6, i want to deploy .war files (web service concretly) and monitor those files with my aspect.

 

I've added to JV_OPTS the -javaagent:..lib/aspectjweaver.jar and also the jar containing my aspect its inside on .war/WEB-INF/lib.

 

Weaving its being done, since if i remove the aspects inside war it doesnt work. And when i put them, it when i remove them it works (but doesnt monitor of course ).

 

I get some logmanager errors and deployment fails, i suspect its because of weaver issues because it works nicely when i dont weave. I tried changing jboss aop.xml to loadtimeweaving to true... (this gives worse error, i guess its because it wont detect jboss-AOP configuration).

 

Also tried configuring META-INF/aop.xml to exclude everything..., it will fail the same

 

 

In short: Is there a way to do aspectj load time weaving (any guide?) or i better start porting my monitor to jboss-AOP?

 

 

Thanks for reading and/or answering, job time's ending, will give more details at tuesday (will read and answer before),