File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Interceptors in ejb 3.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Interceptors in ejb 3.0" Watch "Interceptors in ejb 3.0" New topic

Interceptors in ejb 3.0

Lalit mishra
Ranch Hand

Joined: Sep 01, 2005
Posts: 99
1. If i use Interceptors in a Session bean or MDB
then the interceptors would be applied to all
business methods?
2. If i want to apply inteceptors to only one business methods
how can i achieve it ?

Tridib Samanta
Ranch Hand

Joined: Apr 28, 2004
Posts: 128
When the @Interceptors annotation is applied to an individual method, that interceptor is executed only when that particular method is invoked. If you use the @Interceptors annotation on the bean class, all interceptor classes listed will interpose on every method invocation of every business method of the EJB

Thanks, Tridib
SCJP 1.4, SCWCD 1.4, SCBCD 5.0
jQuery in Action, 2nd edition
subject: Interceptors in ejb 3.0
Similar Threads
EJB 3.0 Interceptors
Interceptors i ejb 3.0
Interceptors in EJB3.0
@ExcludeClassInterceptors annotation
Difference between Interceptors and Callback methods in EJB3