On p.118 of Ivan's notes,
Interceptor methods overridden in a subclass will not be invoked, regardless of whether the overriding method is an interceptor method or not.
I believe it is the other way round. The interceptor method being overridden is not invoked, but the overriding method is invoked.
I modified Ivan's example:
Output on the console with overriding @AroundInvoke method in the interceptor:
MyDefaultInterceptor intercepting : SingletonSessionBeanA. retrieveMessage
Info: LogInterceptor - entering method: retrieveMessage
Info: MyAroundInvoke - entering method: retrieveMessage
Info: *** retrieve message :Message from SingletonSessionBeanA-Ivan Thu Mar 12 16:34:19 EDT 2015
Info: MyAroundInvoke- exiting method: retrieveMessage
Info: MyAroundInvoke- exiting method: retrieveMessage
However, if the @AroundInvoke method in LogInterceptor is not overriding its superclass, like this:
The interceptor of LogInterceptorSuperclass is invoked when its @AroundInvoke method is not overridden:
When @AroundInvoke is not overriden in LogInterceptorSuperclass, it is invoked.
MyDefaultInterceptor intercepting : SingletonSessionBeanA. retrieveMessage
Info: LogInterceptorSuperclass intercepting SingletonSessionBeanA.retrieveMessage
Info: LogInterceptor - entering method: retrieveMessage
Info: MyAroundInvoke - entering method: retrieveMessage
Info: *** retrieve message :Message from SingletonSessionBeanA-[no message set] Thu Mar 12 16:44:00 EDT 2015
Info: MyAroundInvoke- exiting method: retrieveMessage
Info: LogInterceptor- exiting method: retrieveMessage