File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Interceptors Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Interceptors" Watch "Interceptors" New topic
Author

Interceptors

Aditya Vasudeva
Ranch Hand

Joined: May 27, 2008
Posts: 76
What is the need for lifecycle callback methods in Interceptors. According to EJB3 in action, a bean can have the same lifecycle methods in itself as well as in 1 or more interceptors. It also saya that the lifecycle methods get invoked when a certain lifecycle event occurs for the bean. We could have just used lifecycles allowed in the bean itself.
Pavan Shahi
Ranch Hand

Joined: May 01, 2006
Posts: 39
One of use of life cycle callback interceptor method when you define some custom annotation. And in order to work properly it require to perform some initialization task. These task can be perform on life cycle callback interceptor. Then we can apply these interceptor as default interceptor so if any bean use it all initialization perform before any injection happen.

Hope i help you
thanks


SCJP 1.4 (93%)<br />SCBCD 5 (96%)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Interceptors
 
Similar Threads
Entity callback doubt
Lifecycle callback interceptor
how many PrePassivate methods we can have in an stateful session bean ?
New features for entity beans in EJB3
LifeCycle Callback interceptor question