[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] AspectJ loadtime weaving limitation - Aspectwerkz solution - Tomcat

Title: AspectJ loadtime weaving limitation - Aspectwerkz solution - Tomcat

There was a particular scenario where we saw the need to use AOP load time weaving but we could not accomplish what we wanted using AspectJ and

were forced to resort to AspectWerkz.

We needed to apply an aspect around a method that was within a jar file. The caller to that method was a method from another class within the same (or a different) jar file.

The application was deployed on a Tomcat Server and we used Aspectj(agent) to load the Tomcat container . The jar file (where we wanted the aspect to exist) of an application deployed onto the Tomcat Server was loaded via JarClassLoaded (Tomcat default behavior). The "aspecting" wasn't working  but when the method in the jar was being called directly from any of the classes in the application (loaded by WebappClassLoader), "aspecting" worked as expected.

We were able to overcome that limitation when we used AspectWerkz (I heard it hooks to all the existing class loaders except for BootstrapClassLoader).

Would this issue get resolved in future versions of AspectJ as it is collaborating with AspectWerkz?