EJB 3.0 Database Persistence with Oracle Fusion Middleware 11g
上QQ阅读APP看书,第一时间看更新

Interceptors

An interceptor is a method that intercepts a business method invocation or a lifecycle callback event. In EJB 2.x, runtime services such as transaction and security are applied to bean objects at the method's invocation time, using method interceptors that are managed by the EJB container. EJB 3.0 has introduced the Interceptor feature with which the interceptors may be managed by a developer. EJB interceptors are methods annotated with the @javax.ejb.AroundInvoke annotation. Interceptors may be used with business methods of session beans and message-driven beans. Interceptor methods may be defined in the bean class or an external interceptor class with a maximum of one interceptor method per class.