Singleton Session Bean Lifecycle
7 March 2012 By Nithya Vasudevan 1,703 views No Comment
1 Flares 1 Flares ×
- A singleton session bean instance’s life starts when the container invokes the newInstance method on the session bean class to create the singleton bean instance.
- Next, the container performs any dependency injection as specified by the metadata annotations on the bean class or by the deployment descriptor.
- The container then calls the PostConstruct lifecycle callback interceptor methods for the bean, if any.
- The singleton bean instance is now ready to be delegated a business method call from any client or a call from the container to a timeout callback method.
- When the application is shutting down, the container invokes the PreDestroy lifecycle callback interceptor methods on the singleton, if any. This ends the life of the singleton session bean instance.