AspectWerkz begginer problem

"Mart?n P?rez" <[email protected]> Fri, 02 May 2003 09:16:59 +0200
Newsgroups gmane.comp.java.aspectwerkz
Message-ID <[email protected]>
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