Re: [aspectj-users] Please help with weaving not finding my class problem

2009-06-08 Thread Ramnivas Laddad
It appears that for some reason the classes to be woven are (sometimes) getting loaded before Spring's application context is initialized (which configures load-time weaving). You could try two things (besides figuring out why is that class getting loaded sooner and inconsistently). 1. Try AspectJ'

Re: [aspectj-users] around advice not matching with finalize method

2009-06-08 Thread Simone Gianni
Hi Andy and Federico, couldn't "hasmethod" be used here? public static interface HandledFinalize { public void finalize(); } public void HandledFinalize.finalize() { super.finalize(); } declare parents : !hasmethod(public void finalize()) implements HandledF

Re: [aspectj-users] around advice not matching with finalize method

2009-06-08 Thread Andy Clement
I see. Yes, unless Object is woven, you won't be able to advise methods within it. And I wouldn't recommend weaving Object. Usually in this case you can switch to weaving the call join point - but calls to finalize won't be in your control either. Andy 2009/6/8 Federico Firpo Bodner : > Hi And

RE: [aspectj-users] around advice not matching with finalize method

2009-06-08 Thread Federico Firpo Bodner
Hi Andy, That's correct, but only because A.class are overriding the finalize() method, but the pointcut doesn't match for any class with the inerithed finalize from java.lang.Object. I want to advice any class when is garbage collected, but apparently is not possible with the finalize met

Re: [aspectj-users] around advice not matching with finalize method

2009-06-08 Thread Andy Clement
Hi Frederico, I just tried it and it worked for me: --- A.java --- public class A { public static void main(String[]argv) { new A().create(); System.gc(); } private void create() { for (int i=0;i<1000;i++) { new A(); } } protected void finalize() throws Throwable {

Re: [aspectj-users] modifying ant tasks

2009-06-08 Thread Andy Clement
The build for AspectJ is a bit of black magic, I don't go in there much because it is not a lot of fun. Sure you don't want to pick a different codebase? The taskdefs used are defined in the build/src module, but there is a lot of indirection between them and the build process (don't ask why...)

Re: [aspectj-users] AspectJ/spring aop not weaving object for package-level, project-level unit tests

2009-06-08 Thread Andy Clement
To get a clear picture of which types the weaver can see, have you tried turning on verbose debug info for the weaver (via the aop.xml) file? It is described here: http://andrewclement.blogspot.com/2009/02/load-time-weaving-basics.html And basically you add options="-debug" in your weaver sect

RE: [aspectj-users] About aop.xml scope

2009-06-08 Thread jeanlouis.pasturel
Ok sorry for the noise ;( Cordialement / Best regards Jean-Louis Pasturel jeanlouis.pastu...@orange-ftgroup.com _ De : aspectj-users-boun...@eclipse.org [mailto:aspectj-users-boun...@eclipse.org] De la part de fe.character.guide

Re: [aspectj-users] About aop.xml scope

2009-06-08 Thread fe.character.guide
If you're referring to me, I did all of that ;) I have also read and tried out every LTW example possible. It's a no-go beyond getting lucky when starting tomcat... or just testing a few classes at a time. On Mon, Jun 8, 2009 at 7:51 AM, wrote: > > Using aspectj ltw with Spring, as I have underst

RE: [aspectj-users] About aop.xml scope

2009-06-08 Thread jeanlouis.pasturel
Using aspectj ltw with Spring, as I have understood, needs to use the Spring LTW agent and to modify the application-context.xml file as explained : http://static.springframework.org/spring/docs/2.5.x/reference/aop.html#aop-u sing-aspectj § 6.8.4 and following Jean-Louis Pasturel jeanlouis

[aspectj-users] Please help with weaving not finding my class problem

2009-06-08 Thread fe.character.guide
Hi everyone, I have a big problem using AspectJ and Spring, although I suspect this problem may be AspectJ-specific. However, I can't be sure. I am trying to use Spring's @Configurable to add dependency injection to my domain objects. The reason I don't think I have a Spring issue is that I have

RE: [aspectj-users] About aop.xml scope

2009-06-08 Thread Federico Firpo Bodner
Hi Simone, Thank you so much for your explanation. It's preety clear! Regards, Federico. -Mensaje original- De: aspectj-users-boun...@eclipse.org [mailto:aspectj-users-boun...@eclipse.org] En nombre de Simone Gianni Enviado el: lunes, 08 de junio de 2009 13:16 Para: aspectj-use

Re: [aspectj-users] About aop.xml scope

2009-06-08 Thread Simone Gianni
Hi Federico and Tahir, Tahir guess is right : there is no "jar" scope in Java, not because it would not be a good idea, simply because there is no support for that in the Java classloading system. When using an URL classloader it is possible to know from which jar that resource is coming from,

Re: [aspectj-users] About aop.xml scope

2009-06-08 Thread fe.character.guide
My guess is that they are merged, like I said in my previous email. I doubt spring is "the exception to the rule" ;P Regards On Mon, Jun 8, 2009 at 4:37 AM, Federico Firpo Bodner wrote: > Thanks Tahir, but my doubt is: What happens if I put a second jar file with > a second aop.xml file? Both c

RE: [aspectj-users] About aop.xml scope

2009-06-08 Thread Federico Firpo Bodner
Thanks Tahir, but my doubt is: What happens if I put a second jar file with a second aop.xml file? Both configurations are merged? Or each jar keeps the settings in their own aop.xml? Regards, Federico -Mensaje original- De: aspectj-users-boun...@eclipse.org [mailto:aspectj-users-boun...@

Re: [aspectj-users] About aop.xml scope

2009-06-08 Thread Tahir Akhtar
Hi, Here is from my own experience: I have a aop.xml in a jar and it is used to weave all the jars in WEB-INF/lib and all the classes in WEB-INF/classes. When I place the jar containing aop.xml in Tomcat/common/lib it can even weave the classes in jars provided by tomcat. regards, Tahir Akhtar

[aspectj-users] modifying ant tasks

2009-06-08 Thread Christopher Oßner
Hello, I want to evaluate a bug localisation technique. To do so I am using iBugs (http://www.st.cs.uni-saarland.de/ibugs/), which is a repository to trace bugs in aspectj. Since the localisation technique uses call-graphs, it is necessary to instrument aspectj with some code for the call-gra

Re: [aspectj-users] About aop.xml scope

2009-06-08 Thread fe.character.guide
I'm going to take a wild guess and say they are scoped to the entire class loader. My reasoning is that since spring contains an aop.xml in the spring-aspects.jar and if you import that jar in your project, you will inherit the settings from that aop.xml as well as any that you define yourself. On

[aspectj-users] About aop.xml scope

2009-06-08 Thread pilux
Hi All, I have a doubt. Settings in aop.xml are scoped only to the classes contained in same jar file, or are exported and merged into whole JVM weaver? Thanks and regards, Federico -- View this message in context: http://www.nabble.com/About-aop.xml-scope-tp23919264p23919264.html Sent fro