Re: AspectWerkz begginer problem
Jonas Bonér <[email protected]> Fri, 02 May 2003 16:48:19 +0200
| Newsgroups | gmane.comp.java.aspectwerkz |
|---|---|
| Message-ID | <[email protected]> |
Hi Martin. Unfortunately the 0.4 release does not support wildcards when selecting the classes. If you need that you have to checkout the latest sources from the CVS, which supports that. Sorry if this has caused you any inconveniencies. I havn't had time to create a new official release with all the new features yet. - Jonas Martín Pérez wrote: > Hi Aspectwerkz development team. > > First of all, congrats for AspectWerkz I think that getting aspect > configuration out to an XML file it's a great idea and the > path that other AOP frameworks will choose. > > Unfortunatelly, I have been trying Aspectwerkz a few hours and I found > some problems or more concretelly I was unable to > run my aspects. I suppose that the problem has to be very dumb but I'm > not able to find the solution. > > The problem is that when I define the aspect class target it seems > that AspectWerkz isn't capable to user wildcards. For > example, the following leave classes unmodified: > > <aspectwerkz> > <advice name="logging" > class="org/jlibrary/aspects/logging/LoggingAdvice" > deploymentModel="perJVM"/> > <aspect class="org.jlibrary.core.*"> > <pointcut type="method" pattern=".*"> > <advice-ref name="logging"/> > </pointcut> > </aspect> > </aspectwerkz> > > The classes are processed but no changes are applied. On the other > hand, if I put the following User class is processed > correctly: > > <aspectwerkz> > <advice name="logging" > class="org/jlibrary/aspects/logging/LoggingAdvice" > deploymentModel="perJVM"/> > <aspect class="org.jlibrary.core.entities.User"> > <pointcut type="method" pattern=".*"> > <advice-ref name="logging"/> > </pointcut> > </aspect> > </aspectwerkz> > > And this is the command I use to run aspectwerkz: > > aspectwerkz -offline /eclipse- > 2.1.0/workspace/jlibrary/src/org/jlibrary/aspects/aspectwerkz.xml /ecli > pse-2.1.0/workspace/jlibrary/bin /eclipse-2.1.0/workspace/jlibrary/src > > As I said, it seems that AspectWerkz isn't capable to recognize * > wildcard in aspect class definition. I don't send you > LoggingAdvice code as it's your logging example advice. > > I suppose the problem has to be very simple, maybe I'm not understand > pattern syntax. Do you have any idea ? > > > Thanks in advance. > -- > Martín. > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > aspectwerkz-developer mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/aspectwerkz-developer > > -- Jonas http://freeroller.net/page/jboner ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf