This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
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.
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.