wood burning stoves 2.0*
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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Interceptors in ejb 3.0" Watch "Interceptors in ejb 3.0" New topic
Author

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 ?

Thanks
Lalit
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
 
It is sorta covered in the JavaRanch Style Guide.
 
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