I'm trying to make a pointcut which intercepts all methods which are annotated
with a certain annotation. When I run the ant compiler it finds the my aspect,
but when I processes the class which has an annotated method, it says "no
pointcuts found". I use the same syntax as the documentation.
| @Target({ElementType.METHOD})
| public @interface MyAnnotation {}
|
| @Aspect(scope=Scope.PER_VM)
| public class MyAspect {
|
| @Bind(pointcut="execution(* *->@com.company.MyAnnotation(..))")
| public Object transaction(MethodInvocation invocation) throws Throwable {..}
|
| class SomeOtherClass {
| @MyAnnotation() public void foo() {..}
| }
|
It should intercept every invocation to the method SomeOtherClass.foo(). But
it is not binding the pointcut for some reason. Is my pointcut defintion
correct? Thanks a lot.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4239462#4239462
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4239462
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user