FW: [aspectwerkz-user] RE: Initializing references from a "before " aspect
"Hindin, Avi" <[email protected]>
| Newsgroups | gmane.comp.java.aspectwerkz.user |
|---|---|
| Message-ID | <F8B9B12641FB6B4FAC761BDEF9D63B04050B3D4A@tlv-ex-01.adprod.bmc.com> |
Hi Alex, I try it and I'm getting this error: <advice name="aroundGreeting(testAOP.MyCustomJoinPoint jp)" type="around" bind-to="greetMethodPCut"/> org.codehaus.aspectwerkz.exception.DefinitionException: could not find advice method [aroundGreeting(testAOP.MyCustomJoinPoint jp)] in [testAOP.MyAspect2] (are you using a compiler extension that you have not registered?) (are you using XML defined advice, with StaticJoinPoint bindings without specifying the fullsource like signature?) Thanks, Avi. -----Original Message----- From: Alexandre Vasseur [mailto:[email protected]] Sent: Tuesday, April 19, 2005 11:50 AM To: [email protected] Subject: Re: [aspectwerkz-user] RE: Initializing references from a "before" aspect Hi I know our doc is bad on that part. When the advice signature is not just "(JoinPoint anyName)" or "(StaticJoinPoint anyName)" you have to write it entirely in the XML using full qualified names. <advice name="aroundGreeting(YOUR.PACKAGE.MyCustomJoinPoint jp)" type="around" bind-to="greetMethodPCut"/> (doc snip - to be fixed) # name - [mandatory] the name of the advice is the name of the method in the aspect class that implements the advice, with an optional method signature if pointcut with signature are used. Abbreviations can be used in this signature, including for the JoinPoint or StaticJoinPointparameter. The signature must name its parameters (as if it was some source code) like advice3(JoinPoint jp, int i). The method defined this way must exist with the same signature in the aspect class hierarchy. Alex