Hi Alexander,

Thanks for the link/pointer.  I read through it, but am still unclear
how/where this becomes useful.  It is obvious how it can be used in a
standard console java application with a single "main" entry point.  This
would also apply to any self-contained Spring Boot applications (or their
equivalences).  But can something like this be used in any web container?
Be it a tomcat, jetty, wildfly, etc. ?  I don't know of a single entry
point, equivalent to a "main" in a console application.

>From what I understand from the release notes, any classes loaded prior to
the LTW agent being attached won't be woven.  So in the case of a JEE app
(ie: EJBs, etc), the container scans and loads beans in the Dependency tree
long before the application "starts".  So one would need to hook into the
classloading mechanism itself, or provide a custom classloader?  Do you
know if there is a mechanism to do this reliably?  I would obviously want
the Agent loaded as the first class in my EAR.

Thanks,

Eric

On Tue, Oct 17, 2017 at 6:00 PM, Alexander Kriegisch <
[email protected]> wrote:

> Hi Eric.
>
> I remember that one, Andy Clement accepted my corresponding patch a while
> ago.
>
> See https://www.eclipse.org/aspectj/doc/released/README-187.html.
>
> Regards
> --
> Alexander Kriegisch
> https://scrum-master.de
>
>
> Am 17.10.2017 um 17:56 schrieb Eric B <[email protected]>:
>
> Just a quick followup - this is JEE application - NOT a Spring
> application, if that makes any difference to enabling LTW dynamically.
>
> Thanks,
>
> Eric
>
>
> On Tue, Oct 17, 2017 at 11:54 AM, Eric B <[email protected]> wrote:
>
>> Hi,
>>
>> I recently read something on a Redhat tech doc (
>> https://access.redhat.com/solutions/328513) indicating that as of
>> AspectJ 1.8.7, one can enable LTW without using the javaagent on JVM
>> startup.  I've done a quick google search to see if I can find additional
>> documentation/references to this, but can't seem to find relevant links for
>> it.
>>
>> *Note:* The AspectJ 1.8.7 loadtime weaving agent can now be dynamically
>> attached to a JVM after it has started no need to use -javaagent just add
>> the AspectJ libs to the war lib folder.
>>
>> Can anyone provide me with more information as to what is required to
>> enable LTW in an EAR project?  Do I just have to drop the aspectjweaver.jar
>> in the EAR/lib folder?  What mechanism is being used to inject the weaving
>> agent?  Is there additional documentation in the AJ docs that pertains to
>> this that I missed?  I don't see anything on: https://www.eclipse.org/as
>> pectj/doc/released/devguide/ltw-configuration.html#enabling-
>> load-time-weaving
>>
>> Thanks,
>>
>> Eric
>>
>>
> _______________________________________________
> aspectj-users mailing list
> [email protected]
> To change your delivery options, retrieve your password, or unsubscribe
> from this list, visit
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
>
> _______________________________________________
> aspectj-users mailing list
> [email protected]
> To change your delivery options, retrieve your password, or unsubscribe
> from this list, visit
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
_______________________________________________
aspectj-users mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Reply via email to