jsp life cycle has three important methods such as（similar to servlet） 1，init() ->this initalizes the jsp information with the configuration parameters. 2，service : here the business logic starts. that is, all the request and responses goes here. 3，destroy() : once the process is completed, it will be killed. jsf life cycle:
- Restore view: binding of components to its event handlers
- Apply request values: each component to retrieve its current state.
- Process validations: local values stored for the component in the tree are compared to the validation rules registered for the components.
- Update model values: local values of components set to the backing beans.
- Invoke applications: use component values to execute the application’s business logic.
- Render response: JSP container renders the page back to the user.
Hibernate Entity Life Cycle:
- Transient Object: Newly created obj that has no relationship with database
- Persistent Object: Hibernate managed object. i.e. it is associated with persitent context.
- Detached Object: The object in persistent state go into detached state after the persistent context is closed. Detached objects can be brought into other persistent context by reattachment or merging. Detached object still has a valid primary key attribute but it is no longer managed by Hibernate.