Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Mixing post-compile and load-time weaving


Mick,

The reason you have not found any detailed documentation is because what you are trying to do is unusual. You say you are using a custom class loader to define dynamically generated classes. If you only want to weave these classes then only add the aop.xml declaring the aspect you want to use to the CLASSPATH of the custom class loader. When you use the agent all other class loaders will also attempt to weave or reweave the classes they define but no aop.xml configuration will be found. The weaving adaptor for the loader will be disabled and the previously woven classes used straight off disk.

Matthew Webster
AOSD Project
Java Technology Centre, MP146
IBM Hursley Park, Winchester,  SO21 2JN, England
Telephone: +44 196 2816139 (external) 246139 (internal)
Email: Matthew Webster/UK/IBM @ IBMGB, matthew_webster@xxxxxxxxxx
http://w3.hursley.ibm.com/~websterm/



Mick Jordan <Mick.Jordan@xxxxxxx>
Sent by: aspectj-users-bounces@xxxxxxxxxxx

11/10/2006 16:39

Please respond to
Mick.Jordan@xxxxxxx; Please respond to
aspectj-users@xxxxxxxxxxx

To
aspectj-users@xxxxxxxxxxx
cc
Subject
Re: [aspectj-users] Mixing post-compile and load-time weaving





Matthew Webster wrote On 10/11/06 01:51,:

Mick,


WRT combining compile- or post compile-time weaving and LTW there is some information in the Development Environment Guide:
http://www.eclipse.org/aspectj/doc/released/devguide/ltw.html. I presume you only want to use LTW for the classes you are generating and defining with your custom class loader. Are you planning to use the Java 5 LTW agent via "-javaagent" or invoke the Aj interface directly from you class loader?
I've read all that I can find and the documentation wasn't clear or detailed enough IMHO. What I want is to avoid the run-time overhead of aspectifying the classes that I can aspectify at compile time (there are several thousand) and just aspectify the dynamically generated ones. The end result is that everything is aspectified, however.

Yesterday I determined that if I set the classpath to the unaspectified classes and set -javaagent to the JavaVM, everything does get aspectified by the load time weaver, including the dymically generated ones. So that workd but perhaps has a slower startup than necessary. This morning I will try putting the aspectified classes on the class path and see if there is a significant difference.

Mick
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users


Back to the top