Question : Help formulating pointcut for methods implementing annotated interface methods

In my application we have an interface for every service.
A long time we had only one implementation for every service interface.
The implementation methods are annotated with a custom annotation.

1:
2:
3:
4:
5:
6:
@Around("@annotation(de.cware.cweb.ModuleAction)")
public Object performSecurityCheck(ProceedingJoinPoint pjp) throws Throwable
{
    ... Aspect code ...
}


Now I have the problem that the project contains multiple implementations of the service interface and I wanted to avoid having to annotate every method of every service. So I decided to move the annotations to the interface definition. Unfortunately the Aspect is no longer woven to the methods.

My question now is how should I change the pointcut to address methods implementing an interface-method that is annotated with my custom Annotation.

Answer : Help formulating pointcut for methods implementing annotated interface methods

Oh okay, I didn't read the "pointcut to address."  Java by itself is not an aspect-oriented language, so I assume you're using the extension AspectJ (http://en.wikipedia.org/wiki/AspectJ) which is out of my realm of expertise? So when you implement this interface, you want the annotation to continue on to new layers or do you just want the implementations to know that there is annotation?

Sorry, I'm not really of any help; all I can suggest are some links:

http://www.eclipse.org/aspectj/doc/next/adk15notebook/annotations-pointcuts-and-advice.html
http://www.eclipse.org/aspectj/doc/next/adk15notebook/ataspectj-pcadvice.html
http://static.springsource.org/spring/docs/2.5.x/reference/aop.html


And also try adding this question in the AspectJ or Aspect-Oriented-Programming zone if they exist.
Random Solutions  
 
programming4us programming4us