| Circular advice precedence - how to? [message #815130] |
Wed, 07 March 2012 04:12  |
Ashish Missing name Messages: 4 Registered: July 2009 |
Junior Member |
|
|
Hi,
I am trying to achieve the following:
I have a annotation: @A except that @A takes a shortcut if a method it is applied to has its first Method parameter of type say, X.
I have two Pointcuts as:
@Pointcut(value="execution(@A * *(..)) " +
"&& @annotation(annotation) ")
public void trackAnnotatedMethod(A annotation) {}
@Pointcut(value="execution(@A * *(" +
"X,..)) &&" +
"args(x,..) && @annotation(annotation) ")
public void splAnnotatedMethodWithX(A annotation, X x) {}
I get the following exception:
circular advice precedence: can't determine precedence between two or more pieces of advice that apply to the same join point: method-execution(...)
When a method similar to the following is annotated with A:
@A
public void someMethod(X x) {..}
Is there a way to do this? Either by changing the aspect or a different way to achieve the same? Thanks for your help,
-Ashish
|
|
|
|
Powered by
FUDForum. Page generated in 0.01536 seconds