Life cycle

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:
  1. Restore view: binding of components to its event handlers
  2. Apply request values: each component to retrieve its current state.
  3. Process validations: local values stored for the component in the tree are compared to the validation rules registered for the components.
  4. Update model values: local values of components set to the backing beans.
  5. Invoke applications: use component values to execute the application’s business logic.
  6. Render response: JSP container renders the page back to the user.

Hibernate Entity Life Cycle:

  1. Transient Object: Newly created obj that has no relationship with database
  2. Persistent Object: Hibernate managed object. i.e. it is associated with persitent context.
  3. 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.
    Advertisements

    Leave a Reply

    Fill in your details below or click an icon to log in:

    WordPress.com Logo

    You are commenting using your WordPress.com account. Log Out / Change )

    Twitter picture

    You are commenting using your Twitter account. Log Out / Change )

    Facebook photo

    You are commenting using your Facebook account. Log Out / Change )

    Google+ photo

    You are commenting using your Google+ account. Log Out / Change )

    Connecting to %s