Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Interceptors

 
Aditya Vasudeva
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic