[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [aspectj-users] How to use load time weaving?
|
Title: Message
Hi
What
JVM version is this for? If its for JDK 5 then you just have to add -javaagent:lib/aspectjweaver.jar as
JVM startup parameter to enable weaving
Hermod
-----Original Message-----
From:
aspectj-users-bounces@xxxxxxxxxxx [mailto:aspectj-users-bounces@xxxxxxxxxxx]
On Behalf Of Anfernee Xu
Sent: Friday, April 25, 2008 9:32
AM
To: aspectj-users@xxxxxxxxxxx
Subject: [aspectj-users]
How to use load time weaving?
Hi everyone,
I'm
developing an application which will use load time weaving feature, so that I
can control whether my App classes should be weaved at runtime.
I read http://www.eclipse.org/aspectj/doc/released/devguide/ltw-configuration.html,
learned AspectJ comes with the WeavingURLClassLoader probably can help
me.
but there's no concrete example I can take a look, so could someone
please tell me how to use WeavingURLClassLoader? I have checked the source
code, there's 2
constructors available,
(1)public WeavingURLClassLoader (ClassLoader parent)
(2) public WeavingURLClassLoader (URL[] classURLs, URL[] aspectURLs, ClassLoader parent)
Which one I should use? Could you
please explain the meaning for the parameters in detail?
Do I still need to
use <iajc> to compile my aspect source code, and buit
them into a jar file, and pass the jar file URL to the constructor as
the second parameter?
or only package the source code as jar file, and
WeavingURLClassLoader will do all for
me?
Thanks
--
anfernee
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
This email with attachments is solely for the use of the individual or
entity to whom it is addressed. Please also be aware that the DnB NOR Group
cannot accept any payment orders or other legally binding correspondence with
customers as a part of an email.
This email message has been virus checked by the anti virus programs used
in the DnB NOR Group.
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *