Skip to main content

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

Thank you for you answer.

I'll do some more tests whenever I'll get around that part again 🙂

On Sun, Mar 10, 2019 at 3:41 AM Alexander Kriegisch <alexander@xxxxxxxxxxxxxx> wrote:
I am not a Spring expert, but as nobody else has answered so far, I
will: In many cases it seems to actually make sense to activate both
agents. Some applications do not even start correctly or do weaving
correctly if not both agents are used, as my reply there on SO implies:

Sorry I cannot enlighten you more, but I hope this helps anyway.
Alexander Kriegisch

Andrei Ivanov schrieb am 08.03.2019 18:45:
> 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

aspectj-users mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

Back to the top