prao81 (1) [Avatar] Offline
Does spring aspectj ltw not work with multiple class loaders?

I have my an ear which has the war class loader policy as module, which effectively means that the app and the dependent projecs are loaded by the parent class loader , while the web module is loaded by the web class loader which is a child of the parent.

During LTW I notice that the classes in my dependent projects are not woven? On further investigation I have looked at the various load time weaver classes (WebSphereLoadTimeWeaver) and it looks as if the transformation of the class loader is applied only to the default class loader , which invariably is the one associated with the thread which is the web class loader.

How do I get this to work with multiple class loaders? I could change the war class loader policy to application but this is not allowed in my org.

I also tried implementing LoadTimeWeavingConfigurer and invoking the WebSphereLoadTimeWeaver by passing in the required class loader, but any given point the LTW can only transform a single class loader. Is that correct?