| RE: [aspectj-users] Load Time Weaving info? |
|
One additional caveat. If you are running
an app server rather than a simple Java application, you will probably need to
have VM or app-server agent support for weaving. You can follow the directions
from Alex Vasseur’s blog entry (http://blogs.codehaus.org/people/avasseur/archives/001140_aspectj_5_load_time_weaving_with_java_13_using_aspectwerkz.html)
to create support for load-time weaving on an older VM (or try using JRockIt,
which has supported it since 1.3). If you are running on WebSphere I wrote a
ClassLoader plugin to do load-time weaving for it, and it’s possible to
do the same for Weblogic and oc4j (though I don’t think there are any plugins
for either available for AspectJ 1.5) From:
aspectj-users-bounces@xxxxxxxxxxx [mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Ron Bodkin Hi Wim, If you are new to AspectJ load-time
weaving, you should take a look at the developer environment guide for the
basics of configuration: http://www.eclipse.org/aspectj/doc/released/devguide/ltw.html
What version of Java are you using? If you
are using 1.5 it’s quite easy, just use the –javaagent flag to your
VM. If you are using Java 1.4, you might want to use a system ClassLoader I
created to make it easy to launch IntelliJ projects with load-time weaving. See
https://bugs.eclipse.org/bugs/show_bug.cgi?id=121700
to download a jar file that contains it. Typically what we’ve been doing
is to use ant to build the aspects and then include them in the classpath of
the project. This system ClassLoader then finds any META-INF/aop.xml file in
resources on the classpath (jars, exploded directories, etc.) and weaves the
defined aspects into them. If your aspects are unpluggable (i.e., you
can remove them without affecting anything else in the system), you can include
or exclude them by editing the aop.xml file or by having another one (e.g., in
a classes folder) that includes/excludes aspects. From:
aspectj-users-bounces@xxxxxxxxxxx [mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Wim Deblauwe Hi, |