Hi Hermod, First of all, I do not want to change my Application launch script, secondly I may want to support JDK 1.4. I think the classloader approach is more elegant.
Thanks Anfernee On Mon, Apr 28, 2008 at 12:55 PM, <[EMAIL PROTECTED]> wrote: > Send aspectj-users mailing list submissions to > [email protected] > > To subscribe or unsubscribe via the World Wide Web, visit > https://dev.eclipse.org/mailman/listinfo/aspectj-users > or, via email, send a message with subject or body 'help' to > [EMAIL PROTECTED] > > You can reach the person managing the list at > [EMAIL PROTECTED] > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of aspectj-users digest..." > > > Today's Topics: > > 1. RE: RE: How to use load timeweaving(WeavingURLClassLoader)? > ([EMAIL PROTECTED]) ([EMAIL PROTECTED]) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 28 Apr 2008 06:56:13 +0200 > From: <[EMAIL PROTECTED]> > Subject: RE: [aspectj-users] RE: How to use load > timeweaving(WeavingURLClassLoader)? ([EMAIL PROTECTED]) > To: <[email protected]> > Message-ID: > <[EMAIL PROTECTED]> > Content-Type: text/plain; charset="iso-8859-1" > > Hi > > I still don't see why #1 won't fit your case. Your classloaders inherit > the classpath and properties from the main class loader don't they? > > Hermod > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto: > [EMAIL PROTECTED] On Behalf Of Anfernee Xu > Sent: Monday, April 28, 2008 4:25 AM > To: [email protected] > Subject: [aspectj-users] RE: How to use load > timeweaving(WeavingURLClassLoader)? ([EMAIL PROTECTED]) > > > Hi Hermod, > > > Thanks for your information, but this approach is not what I want, > according to > > http://www.eclipse.org/aspectj/doc/released/devguide/ltw-configuration.html > > there're 3 ways to enable load-time weaving, your suggestion is #1 agent, > but > I would like to use #3 Custom classloader (WeavingURLClassLoader). > > My application is multi-Classloader application, a sub-component has its > own ClassLoader (My App classloader) to load its classes to get working, my > intention is to use WeavingURLClassLoader to wrap in My App classloader, so > my classes can be weaved at load time. > > I want to know how and what I need to do to use WeavingURLClassLoader. > > Thanks > > Anfernee > > > On Fri, Apr 25, 2008 at 10:11 PM, <[EMAIL PROTECTED]> > wrote: > > > Send aspectj-users mailing list submissions to > [email protected] > > To subscribe or unsubscribe via the World Wide Web, visit > https://dev.eclipse.org/mailman/listinfo/aspectj-users > or, via email, send a message with subject or body 'help' to > [EMAIL PROTECTED] > > You can reach the person managing the list at > [EMAIL PROTECTED] > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of aspectj-users digest..." > > > Today's Topics: > > 1. AJDT 1.5.2 for Eclipse 3.3 now available (incorporates > AspectJ 1.6.0) (Andy Clement) > 2. How to use load time weaving? (Anfernee Xu) > 3. RE: How to use load time weaving? ([EMAIL PROTECTED]) > 4. Around Advice Generic (vtitou vergeos) > 5. Re: Around Advice Generic (Eric Bodden) > 6. Re: Around Advice Generic (Dean Wampler) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 24 Apr 2008 16:43:50 -0700 > From: "Andy Clement" <[EMAIL PROTECTED]> > Subject: [aspectj-users] AJDT 1.5.2 for Eclipse 3.3 now available > (incorporates AspectJ 1.6.0) > To: [email protected], "AspectJ Development Tools developer > discussions" <[EMAIL PROTECTED]> > Message-ID: > <[EMAIL PROTECTED]> > Content-Type: text/plain; charset=ISO-8859-1 > > AJDT 1.5.2 final is now available for Eclipse 3.3. This includes > AspectJ1.6.0 final which shipped yesterday. > > It is available at the release update site: > > http://download.eclipse.org/tools/ajdt/33/update > > The download page also includes a link to a downloadable zip version of > AJDT: > > http://www.eclipse.org/ajdt/downloads/ > > For more information on AspectJ 1.6.0, see the readme: > > http://www.eclipse.org/aspectj/doc/released/README-160.html > > The 33 dev update site for AJDT will now host AJDT 1.5.3 builds that > will incorporate early AspectJ1.6.1 builds. > > --- > > > ------------------------------ > > Message: 2 > Date: Fri, 25 Apr 2008 15:31:49 +0800 > From: "Anfernee Xu" <[EMAIL PROTECTED]> > Subject: [aspectj-users] How to use load time weaving? > To: [email protected] > Message-ID: > <[EMAIL PROTECTED]> > Content-Type: text/plain; charset="iso-8859-1" > > 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 > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > https://dev.eclipse.org/mailman/private/aspectj-users/attachments/20080425/f9ef8939/attachment.html > > ------------------------------ > > Message: 3 > Date: Fri, 25 Apr 2008 10:04:58 +0200 > From: <[EMAIL PROTECTED]> > Subject: RE: [aspectj-users] How to use load time weaving? > To: <[email protected]> > Message-ID: > <[EMAIL PROTECTED]> > Content-Type: text/plain; charset="us-ascii" > > 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: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Anfernee Xu > Sent: Friday, April 25, 2008 9:32 AM > To: [email protected] > 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.h < > http://www.eclipse.org/aspectj/doc/released/devguide/ltw-configuration.html > > > tml, 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) 4 years">public WeavingURLClassLoader (ClassLoader parent) > > (2) 4 years"> 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 4 > years">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. > > * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * > * > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > https://dev.eclipse.org/mailman/private/aspectj-users/attachments/20080425/68c16fe8/attachment.html > > ------------------------------ > > Message: 4 > Date: Fri, 25 Apr 2008 12:35:43 +0200 > From: vtitou vergeos <[EMAIL PROTECTED]> > Subject: [aspectj-users] Around Advice Generic > To: <[email protected]> > Message-ID: <[EMAIL PROTECTED]> > Content-Type: text/plain; charset="windows-1252" > > Hi, > > I try to use around advice for a general use. I would like to use around > for all the methods of a class which one does not know in advance the > functions. For example, for a class A has which has 6 methods and a file > aspectJ which defines a pointcut A.* for all the methods of A, is it > possible to define a generic around for example: > > pointcut methods (): execution (public A.* (...)); > > Object around (): methods () { > .... > return proceed (); > } > > knowing that the methods of A have different signatures ! I tested the > code written above and it does not function, it never passes in the around > method whereas with a before or an after for the same pointcut, it works > very well. If somebody already had to deal with this problem, I am waiting > your answers! > > Cordially > > Antoine > > _________________________________________________________________ > Votre contact a choisi Hotmail, l'e-mail ultra sécurisé. Créez un compte > gratuitement ! > http://www.windowslive.fr/hotmail/default.asp > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > https://dev.eclipse.org/mailman/private/aspectj-users/attachments/20080425/7589eb67/attachment.html > > ------------------------------ > > Message: 5 > Date: Fri, 25 Apr 2008 09:58:10 -0400 > From: "Eric Bodden" <[EMAIL PROTECTED]> > Subject: Re: [aspectj-users] Around Advice Generic > To: [email protected] > Message-ID: > <[EMAIL PROTECTED]> > Content-Type: text/plain; charset=WINDOWS-1252 > > Hi. > > As far as I can see this advice should be correct (in the sense that > it executes but has no visible effect on the program). > > Eric > > 2008/4/25 vtitou vergeos <[EMAIL PROTECTED]>: > > > > Hi, > > > > I try to use around advice for a general use. I would like to use around > for > > all the methods of a class which one does not know in advance the > functions. > > For example, for a class A has which has 6 methods and a file aspectJ > which > > defines a pointcut A.* for all the methods of A, is it possible to > define a > > generic around for example: > > > > pointcut methods (): execution (public A.* (...)); > > > > Object around (): methods () { > > .... > > return proceed (); > > } > > > > knowing that the methods of A have different signatures ! I tested the > code > > written above and it does not function, it never passes in the around > > method whereas with a before or an after for the same pointcut, it works > > very well. If somebody already had to deal with this problem, I am > waiting > > your answers! > > > > Cordially > > > > Antoine > > > > ________________________________ > > Avec Windows Live Messenger restez en contact avec tous vos amis ! > > Téléchargez Messenger, c'est gratuit ! > > _______________________________________________ > > aspectj-users mailing list > > [email protected] > > https://dev.eclipse.org/mailman/listinfo/aspectj-users > > > > > > > > -- > Eric Bodden > Sable Research Group > McGill University, Montréal, Canada > > > ------------------------------ > > Message: 6 > Date: Fri, 25 Apr 2008 09:10:34 -0500 > From: Dean Wampler <[EMAIL PROTECTED]> > Subject: Re: [aspectj-users] Around Advice Generic > To: [email protected] > Message-ID: > <[EMAIL PROTECTED]> > Content-Type: text/plain; charset="windows-1252" > > Your "methods" pointcut is missing the return type for the method and > you should have 2 periods for the method argument list: > > > pointcut methods (): execution (public * A.* (..)); > > Actually, AspectJ might infer the return type. I always put it in the > definition. The 2 periods is important! 3 periods should give a > compilation error. > > Also, make sure that "A" is visible without the fully-qualified > package name, etc. I don't believe that AspectJ will flag an error if > no "A" is visible, but you will get a warning that no join points were > advised. > > On Apr 25, 2008, at 5:35 AM, vtitou vergeos wrote: > > > Hi, > > > > I try to use around advice for a general use. I would like to use > > around for all the methods of a class which one does not know in > > advance the functions. For example, for a class A has which has 6 > > methods and a file aspectJ which defines a pointcut A.* for all the > > methods of A, is it possible to define a generic around for example: > > > > pointcut methods (): execution (public A.* (...)); > > > > Object around (): methods () { > > .... > > return proceed (); > > } > > > > knowing that the methods of A have different signatures ! I tested > > the code written above and it does not function, it never passes in > > the around method whereas with a before or an after for the same > > pointcut, it works very well. If somebody already had to deal with > > this problem, I am waiting your answers! > > > > Cordially > > > > Antoine > > > > Avec Windows Live Messenger restez en contact avec tous vos amis ! > > Téléchargez Messenger, c'est gratuit ! > > _______________________________________________ > > aspectj-users mailing list > > [email protected] > > https://dev.eclipse.org/mailman/listinfo/aspectj-users > > Dean Wampler, Ph.D. > dean at objectmentor.com > http://www.objectmentor.com > See also: > http://www.aspectprogramming.com AOP advocacy site > http://aquarium.rubyforge.org AOP for Ruby > http://www.contract4j.org Design by Contract for Java5 > > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > https://dev.eclipse.org/mailman/private/aspectj-users/attachments/20080425/1ed65f14/attachment.html > > ------------------------------ > > _______________________________________________ > aspectj-users mailing list > [email protected] > https://dev.eclipse.org/mailman/listinfo/aspectj-users > > > End of aspectj-users Digest, Vol 38, Issue 28 > ********************************************* > > > > > > -- > 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. > > * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * > * > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > https://dev.eclipse.org/mailman/private/aspectj-users/attachments/20080428/1896c15c/attachment.html > > ------------------------------ > > _______________________________________________ > aspectj-users mailing list > [email protected] > https://dev.eclipse.org/mailman/listinfo/aspectj-users > > > End of aspectj-users Digest, Vol 38, Issue 33 > ********************************************* > -- anfernee
_______________________________________________ aspectj-users mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/aspectj-users
