Can someone tell me how Class Annotations (like Interceptor) are processed on protected or private Methods?
If I have an EJB like this:
@Stateless
@Interceptors({ SomeInterceptor.class })
public class ContactBean implements ContactLocal {
@Override
public void doSomethingWithPublicMethod(final Long id) {
return doSomething(id)
}
ContactEntity doSomething(final Long id){
doSomethingPrivate(id);
}
private doSomethingPrivate(final Long id){
...
}
Is the Interceptor called on all Methods, just the ones that are marked as @Override (couldn't see why it should do that) or is there any other rule? I was scanning the Java EE tutorial real quick but can't find anything describing that. May it be up to the container?
So I assume I should have all my Interceptors, Transactions etc. on the Interface and never on the Bean implementation if I want to have them working only on methods that implement the interface...?