Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] java agent: spring-instrument.jar vs aspectjweaver.jar

Hi,
What's the difference between using spring-instrument.jar as a java agent vs aspectjweaver.jar?

My current experimentations indicate that spring-instrument.jar is required by Spring to enable LTW,
but that will happen at a later stage and some classes might already be loaded by then and miss the LTW transformations, which bit me in one case already.

Using aspectjweaver.jar seems to enable the class instrumentation from the begining, but I can no longer use the AspectJWeaverMessageHandler
provided by Spring as it's not yet visible in the main classloader, since it's packaged in my web app and also Spring complains that the classloader is missing
some infrastructure provided by spring-instrument.jar, which makes me think that I maybe could use both java agents.
Or maybe in this case I shouldn't enable LTW in the Spring configuration at all?

Thank you

Back to the top