org.jboss.ejb
Interface StatefulSessionPersistenceManager

All Superinterfaces:
AllowedOperationsFlags, ContainerPlugin, org.jboss.system.Service
All Known Implementing Classes:
StatefulSessionFilePersistenceManager

public interface StatefulSessionPersistenceManager
extends ContainerPlugin

The interface for persisting stateful session beans.

Version:
$Revision: 57209 $
Author:
Rickard Öberg, Jason Dillon

Field Summary
 
Fields inherited from interface org.jboss.ejb.AllowedOperationsFlags
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 ctx)
          Activate the SFSB for the given context.
 void createdSession(StatefulSessionEnterpriseContext ctx)
          Called after the SFSB's ejbCreate method has been successfully invoked to allow the PM to perform an post creation setup.
 Object createId(StatefulSessionEnterpriseContext ctx)
          Create a unique identifier for the given SFSB context.
 void passivateSession(StatefulSessionEnterpriseContext ctx)
          Passivate the SFSB for the given context.
 void removePassivated(Object id)
          Remove any passivated state for the given SFSB identifier.
 void removeSession(StatefulSessionEnterpriseContext ctx)
          Remove the SFSB for the given context.
 
Methods inherited from interface org.jboss.ejb.ContainerPlugin
setContainer
 
Methods inherited from interface org.jboss.system.Service
create, destroy, start, stop
 

Method Detail

createId

Object createId(StatefulSessionEnterpriseContext ctx)
                throws 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:
Exception - Failed to create unique identifier.

createdSession

void createdSession(StatefulSessionEnterpriseContext ctx)
                    throws 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:
Exception

activateSession

void activateSession(StatefulSessionEnterpriseContext ctx)
                     throws 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:
RemoteException

passivateSession

void passivateSession(StatefulSessionEnterpriseContext ctx)
                      throws 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:
RemoteException

removeSession

void removeSession(StatefulSessionEnterpriseContext ctx)
                   throws RemoteException,
                          javax.ejb.RemoveException
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:
RemoteException
javax.ejb.RemoveException

removePassivated

void removePassivated(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.


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.