org.apache.shale.view
Class AbstractSessionBean

java.lang.Object
  extended by org.apache.shale.view.AbstractFacesBean
      extended by org.apache.shale.view.AbstractSessionBean
All Implemented Interfaces:
Serializable

public abstract class AbstractSessionBean
extends AbstractFacesBean
implements Serializable

AbstractSessionBean is the abstract base class for data bean(s) that are stored in session scope attributes. It extends AbstractFacesBean, so it inherits all of the default behavior found there. In addition, the following lifecycle methods are called automatically when the corresponding events occur:

$Id: AbstractSessionBean.java 464373 2006-10-16 04:21:54Z rahul $

See Also:
Serialized Form

Constructor Summary
AbstractSessionBean()
          Create a new session scope bean.
 
Method Summary
 void activate()
          This method is called when the session containing it was reactivated.
 void destroy()
          This method is called when this bean is removed from session scope.
 void init()
          This method is called when this bean is initially added to session scope.
 void passivate()
          This method is called when the session containing it is about to be passivated.
 
Methods inherited from class org.apache.shale.view.AbstractFacesBean
erase, error, error, fatal, fatal, getApplication, getApplicationMap, getBean, getExternalContext, getFacesContext, getLifecycle, getRequestHeaderMap, getRequestMap, getRequestParameter, getRequestParameterMap, getRequestParameterValues, getSessionMap, getValue, info, info, log, log, retrieveData, saveData, setBean, setValue, warn, warn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractSessionBean

public AbstractSessionBean()

Create a new session scope bean.

Method Detail

init

public void init()

This method is called when this bean is initially added to session scope. Typically, this occurs as a result of evaluating a value binding or method binding expression, which utilizes the managed bean facility to instantiate this bean and store it into session scope.

You may customize this method to initialize and cache data values or resources that are required for the lifetime of a particular user session.


passivate

public void passivate()

This method is called when the session containing it is about to be passivated. Typically, this occurs in a distributed servlet container when the session is about to be transferred to a different container instance, after which the activate() method will be called to indicate that the transfer is complete.

You may customize this method to release references to session data or resources that can not be serialized with the session itself.


activate

public void activate()

This method is called when the session containing it was reactivated.

You may customize this method to reacquire references to session data or resources that could not be serialized with the session itself.


destroy

public void destroy()

This method is called when this bean is removed from session scope. Typically, this occurs as a result of the session timing out or being terminated by the application.

You may customize this method to clean up resources allocated during the execution of the init() method, or at any later time during the lifetime of the application.



Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.