Re: [aspectj-users] java agent: spring-instrument.jar vs aspectjweaver.jar
Understood, 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 < alexan...@kriegisch.name> 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: > > https://stackoverflow.com/a/25723050/1082681 > > Sorry I cannot enlighten you more, but I hope this helps anyway. > -- > Alexander Kriegisch > https://scrum-master.de > > 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 > aspectj-users@eclipse.org > To change your delivery options, retrieve your password, or unsubscribe > from this list, visit > https://www.eclipse.org/mailman/listinfo/aspectj-users > ___ aspectj-users mailing list aspectj-users@eclipse.org To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/aspectj-users
Re: [aspectj-users] java agent: spring-instrument.jar vs aspectjweaver.jar
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: https://stackoverflow.com/a/25723050/1082681 Sorry I cannot enlighten you more, but I hope this helps anyway. -- Alexander Kriegisch https://scrum-master.de 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 aspectj-users@eclipse.org To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/aspectj-users
[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 ___ aspectj-users mailing list aspectj-users@eclipse.org To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/aspectj-users