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,

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?

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 01:32

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

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





I have a large application to which I am applying aspects using
post-compile weaving. The application generates some new classes at
run-time and loads them with its own class loader directly from a
bytcode array. I would also like to apply the same aspects to these
classes. I'm not entirely sure how to do this. I have used the -outxml
file to generate an aop.xml file but it seems very basic, e.g.,

<aspectj>
<aspects>
<aspect name="MyAspect"/>
</aspects>
</aspectj>

The documentation on load-time weaving isn't clear on what happens if
you mix post-compile weaved classes and load-time weaving. My hope would
be that the load-time weaver could avoid reweaving the already woven
classes but the flexibility that appears to available in aop.xml
suggests that this might be difficult. Ideally I would like the aop.xml
file to restrict load-time weaving to just the new classes that are
generated at runtime. Assuming that I can identify them with a
package/classname pattern perhaps the <weaver> tag can be used to
achieve this? I'd appreciate any clarification on my understanding of this.

Thanks
Mick Jordan

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


Back to the top