[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] Load Time Weaving info?
|
Hi Ron,
thank you for taking the time to answer my question so clearly!
I read the blog entry and your article, but what I really looked for was more info on that aop.xml file. I thought that was something that spring
2.0 brought, but it is not apperently. But your link to the dev guide is really what I was looking for. Thanks!
BTW, strange I did not find it myself, I really looked hard at all the docs on the eclipse site.
Well, it seems I'm in luck because I have a standard java app using Java
1.5, so I'll give it a try.
While I'm busy typing, I have a question about your blog entry: why do you need this part in the spring file:
<bean
class="org.aspectprogrammer.samples.domain.Account
"
lazy-init="true">
<property name="accountService" ref="accountService"/>
</bean>
It seems to me that this is just plain old spring. Why the use of aspects and annotations on the Account class. My initial thought was that Account would get the AccountService without having to explicitly wire them up in the spring xml file. What am I missing?
thanks again,
Wim
2006/4/7, Ron Bodkin <rbodkin@xxxxxxxxxxxxxx>:
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)
Subject: RE: [aspectj-users] Load
Time Weaving info?
Hi Wim,
Adrian
wrote a nice blog entry that includes a description of how to set
up IntelliJ for LTW: http://www.aspectprogrammer.org/blogs/adrian/2006/02/a_practical_gui_2.html
.
I also discussed the topic it in a recent article "Next steps with
aspects" http://www-128.ibm.com/developerworks/java/library/j-aopwork16/#N10183
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.
Hi,
I just started on AspectJ and I'm looking for info on LTW. More specific, on
info for doing this scenario:
At my company, we use IntelliJ (which has no aspectJ support currently) and we want
to keep it that way. So, I would like to write some aspects in Eclipse (I am
now starting out with a logging aspect, what else? ;)) and then do LTW to
enable the aspects in our code.
I already managed to write a simple logging aspect and got it working in
Eclipse, but how do I go from there? I probably need to create a jar from the
aspect somehow? Then how do I enable the LTW? Is it easy to enable/disable
individual aspects? What needs to be on my classpath in IntelliJ then?
any help is highly appreciated!
regards,
Wim
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users