Search code examples
springjboss5.xaspectjjboss6.xload-time-weaving

How to use load time weaver in JBoss 6 with Spring 3 for AspectJ?


I tried using AspectJ, Spring 3 and JBoss 6 and ran into the problem that the load time weaving is not working at all. Creating small sample showed that the same war file that has a simple bean and a simple aspect works fine on JBoss 5.1 but does not trigger the LTW in JBoss 6 at all.

Update: I opened an issue at the Spring bugtracker -> https://jira.springsource.org/browse/SPR-7887


Solution

  • Most likely because the LTW was written specifically for JBoss 5, and it's not surprising that it doesn't work on JBoss 6 (look at the source code for the instrumenter, it's a mess).

    If you want to use Spring LTW with JBoss, you'll have to stick with JBoss 5.1