Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] aspectj loadtime weaving




Mike,

Can you modify the substitute class loader in your project? If so take a
look at WeavingURLClassLoader
(http://dev.eclipse.org/viewcvs/index.cgi/org.aspectj/modules/weaver/src/org/aspectj/weaver/WeavingURLClassLoader.java?rev=HEAD&cvsroot=Technology_Project&content-type=text/vnd.viewcvs-markup)
 and use it as a model to write your own. AspectJ 5 will support an agent
that uses JVMTI that will also solve your problem.

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/

Mike Haladin <mike.haladin@xxxxxx>@eclipse.org on 18/04/2005 10:10:57

Please respond to aspectj-users@xxxxxxxxxxx

Sent by:    aspectj-users-bounces@xxxxxxxxxxx


To:    aspectj-users@xxxxxxxxxxx
cc:
Subject:    [aspectj-users] aspectj loadtime weaving


Hello,

             I am interested in using the load time weaving feature of
aspectj.

             I know it is possible to use aspectj as a system.class.loader:

             "$JAVA_HOME/bin/java" -classpath
"$ASPECTJ_HOME/lib/aspectjweaver.jar"
"-Djava.system.class.loader=org.aspectj.weaver.WeavingURLClassLoader"
"-Daj.class.path=$ASPECTPATH:$CLASSPATH" "-Daj.aspect.path=$ASPECTPATH"
"$@"

however, my project starts it's java processes using a "launcher" jar
which is necessary in oider to resolve dependencies:

ie:

java -jar laucherjar.jar <process>.jar <args>

this jar sets itself as a system.class.loader already and therefor
inteferes with the load time weaving using the above mentioned method.

I have noticed that aspectwerkz has several other methods such as
bootclasspath and native hotswapping.

As far as I can tell these features are not yet available in the
milestone 2 release of aspectj 1.5.

Is there a way to achieve this currently or do I need to wait for
aspectj 1.5 to be released?

Does anyone know the projected release date of aspectj 1.5.

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




Back to the top