The lifecycle of stateless bean
by, 01-02-2012 at 07:03 PM (1031 Views)
Stateless session beanís life cycle consists of 2 stages namely; ready for the invocation of the business method and non existent. Client initiates the life cycle by seeking references towards the stateless bean. Dependency injection is performed by the container and then the method annotated @PostConstruct is invoked. Now bean is ready to invoke the business methods by client. Method annotated @PreDestroy is called by the EJB container at the end of life cycle, if any. Then for garbage collection, beanís instance is ready.