[aspectwerkz-user] change parameter with advice method
Marco Indaco <[email protected]> Tue, 26 Jan 2010 10:48:47 +0100
| Newsgroups | gmane.comp.java.aspectwerkz.user |
|---|---|
| Message-ID | <[email protected]> |
Hi at all, I'm a student researcher to the university Federico II (Italy, Na).
I have some problem with aspectwerkz 2.0 on tomcat 5.5.28
package aop.prova;
import org.codehaus.aspectwerkz.joinpoint.StaticJoinPoint;
public class Demo {
public static interface MyCustomJoinPoint extends StaticJoinPoint {
Object proceed(String arg);
}
public Object around(MyCustomJoinPoint jp, String arg) {
// lets change the args :
return jp.proceed("new arg");
}
}
that is my simple aspect class.
My aop.xml is :
<!DOCTYPE aspectwerkz PUBLIC
"-//AspectWerkz//DTD 2.0//EN"
"http://aspectwerkz.codehaus.org/dtd/aspectwerkz.dtd">
<aspectwerkz>
<system id="webapp">
<aspect class="aop.prova.Demo">
<pointcut name="calleeArgFiltered(String arg)" expression="call(*
pl.kuligowski.advweb.AdvRepository.getAdvertByWord(..)) AND
args(arg)"/>
<advice name="around(aop.prova.MyCustomJoinPoint jp,
String arg)" type="around" bind-to="calleeArgFiltered(arg)"/>
</aspect>
</system>
</aspectwerkz>
this is exception throws a runtime!!
org.codehaus.aspectwerkz.exception.DefinitionException: could not find advice me
thod [around(aop.prova.MyCustomJoinPoint jp, String arg)] in [aop.prova.Demo] (a
re you using a compiler extension that you have not registered?) (are you using
XML defined advice, with StaticJoinPoint bindings without specifying the fullsou
rce like signature?)
at org.codehaus.aspectwerkz.definition.DocumentParser.parseAdviceElement
s(DocumentParser.java:694)
I read any suggestion that you gave to org.codehaus.aspectwerkz.user
but neither resolve that problem.
Please to help me!!
Thanks in advance
Marco Indaco
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email