How many interceptor classes can be applied to a single stateful session bean?

How many interceptor classes can be applied to a single stateful session bean?

How many interceptor classes can be applied to a single stateful session bean?

A.
a maximum of one

B.
any number may be applied

C.
one for each business method

D.
one for each business interface

Explanation:
The @Interceptors annotation can take an array of classes, so you can bind more
than one class-level interceptor this way, e.g.
@Stateless
@Interceptors ({TracingInterceptor.class, SomeInterceptor.class})
public class EmailSystemBean
{
}
Reference: EJB Interceptors
http://docs.jboss.org/ejb3/app-server/tutorial/interceptor/interceptor.html



Leave a Reply 0

Your email address will not be published. Required fields are marked *