org.jboss.ejb
Interface StatefulSessionPersistenceManager

All Superinterfaces:
AllowedOperationsFlags (src) , ContainerPlugin (src) , Service (src)
All Known Implementing Classes:
StatefulHASessionPersistenceManager (src) , StatefulSessionFilePersistenceManager (src)

public interface StatefulSessionPersistenceManager
extends ContainerPlugin (src)

The interface for persisting stateful session beans.


Field Summary
 
Fields inherited from interface org.jboss.ejb.AllowedOperationsFlags (src)
IN_AFTER_BEGIN, IN_AFTER_COMPLETION, IN_BEFORE_COMPLETION, IN_BUSINESS_METHOD, IN_EJB_ACTIVATE, IN_EJB_CREATE, IN_EJB_FIND, IN_EJB_HOME, IN_EJB_LOAD, IN_EJB_PASSIVATE, IN_EJB_POST_CREATE, IN_EJB_REMOVE, IN_EJB_STORE, IN_EJB_TIMEOUT, IN_INTERCEPTOR_METHOD, IN_SERVICE_ENDPOINT_METHOD, IN_SET_ENTITY_CONTEXT, IN_SET_MESSAGE_DRIVEN_CONTEXT, IN_SET_SESSION_CONTEXT, IN_UNSET_ENTITY_CONTEXT, NOT_ALLOWED
 
Method Summary
 void activateSession(StatefulSessionEnterpriseContext (src)  ctx)
          Activate the SFSB for the given context.
 void createdSession(StatefulSessionEnterpriseContext (src)  ctx)
          Called after the SFSB's ejbCreate method has been successfully invoked to allow the PM to perform an post creation setup.
 java.lang.Object createId(StatefulSessionEnterpriseContext (src)  ctx)
          Create a unique identifier for the given SFSB context.
 void passivateSession(StatefulSessionEnterpriseContext (src)  ctx)
          Passivate the SFSB for the given context.
 void removePassivated(java.lang.Object id)
          Remove any passivated state for the given SFSB identifier.
 void removeSession(StatefulSessionEnterpriseContext (src)  ctx)
          Remove the SFSB for the given context.
 
Methods inherited from interface org.jboss.ejb.ContainerPlugin (src)
setContainer
 
Methods inherited from interface org.jboss.system.Service (src)
create, destroy, start, stop
 

Method Detail

createId

public java.lang.Object createId(StatefulSessionEnterpriseContext (src)  ctx)
                          throws java.lang.Exception
Create a unique identifier for the given SFSB context.

Parameters:
ctx - The context of the SFSB to create an unique identifier for.
Returns:
A unique identifier.
Throws:
java.lang.Exception - Failed to create unique identifier.

createdSession

public void createdSession(StatefulSessionEnterpriseContext (src)  ctx)
                    throws java.lang.Exception
Called after the SFSB's ejbCreate method has been successfully invoked to allow the PM to perform an post creation setup.

Parameters:
ctx - The context of the SFSB which was created.
Throws:
java.lang.Exception

activateSession

public void activateSession(StatefulSessionEnterpriseContext (src)  ctx)
                     throws java.rmi.RemoteException
Activate the SFSB for the given context.

Implementation is responsible for invoking the bean's SessionBean.ejbActivate() method.

Parameters:
ctx - The context of the SFSB to activate.
Throws:
java.rmi.RemoteException

passivateSession

public void passivateSession(StatefulSessionEnterpriseContext (src)  ctx)
                      throws java.rmi.RemoteException
Passivate the SFSB for the given context.

Implementation is responsible for invoking the bean's SessionBean.ejbPassivate() method.

Parameters:
ctx - The context of the SFSB to passivate.
Throws:
java.rmi.RemoteException

removeSession

public void removeSession(StatefulSessionEnterpriseContext (src)  ctx)
                   throws java.rmi.RemoteException,
                          RemoveException (src) 
Remove the SFSB for the given context.

Implementation is responsible for invoking the bean's SessionBean.ejbRemove() method.

Parameters:
ctx - The context of the SFSB to remove.
Throws:
java.rmi.RemoteException
RemoveException (src)

removePassivated

public void removePassivated(java.lang.Object id)
Remove any passivated state for the given SFSB identifier.

This is called by the instance cache impl to clean up the state for an old session.

Parameters:
id - The identifier of the SFSB to remove passivate state for.