Adding EJB Interceptors with Custom Annotations

I have several EJB3.0 interceptors that require additional configuration. So far, I just added interceptors via @Interceptors( { MyInterceptor.class } ) , and then added a second user annotation like @MyInterceptorConfiguration(value=something) .

This is pretty tiring. Is it possible to annotate an annotation so that it causes an interceptor to be added? Ideally, I would just add @DoMyInterception(config=foo) to the class and add this interceptor.

0
source share
1 answer

This is only possible with CDI stereotype annotations (see interceptor examples ) in EE 6 (EJB 3.1).

+2
source

All Articles