jrun.ejb.persistence
Class StatefulSessionPersistenceManager

jrunx.kernel.ServiceAdapter
  |
  +--jrun.ejb.persistence.StatefulSessionPersistenceManager
All Implemented Interfaces:
javax.naming.Referenceable, java.io.Serializable, Service, ServiceMBean

public class StatefulSessionPersistenceManager
extends ServiceAdapter

The stateful session persistence manager is responsible for invoking ejbActivate and ejbPassivate, but it delegates actual persistence responsibilities to the pluggable PersistenceStore.

Author:
Paul Reilly
See Also:
Serialized Form

Fields inherited from class jrunx.kernel.ServiceAdapter
DEFAULT_DEACTIVATED, DEFAULT_DOMAIN, DOMAIN_NAME_SEPARATOR, DOMAIN_NAME_SUFFIX, domainName, jndiBindable, LOGGER_CACHE_TIME, SCHEDULER_SERVICE, SECURITY_MANAGER, server, status, TRANSACTION_MANAGER
 
Fields inherited from interface jrunx.kernel.Service
INITIALIZED, STARTED, STARTING, STOPPED, STOPPING, UNINITIALIZED
 
Constructor Summary
StatefulSessionPersistenceManager(StatefulSessionContainer statefulSessionContainer)
           
 
Method Summary
 Instance activate(java.lang.Object id)
          Load the instance corresponding to id from the persistence store.
 void insert(Instance instance)
          Inserts the instance into the persistence store.
 void passivate(java.lang.Object id)
          Store the instance in the persistence store.
 void remove(java.lang.Object id)
          Remove the instance from the persistence store.
 
Methods inherited from class jrunx.kernel.ServiceAdapter
bind, destroy, findObjectInstance, findObjectInstance, findObjectInstance, getBindToJNDI, getDeactivated, getDomainName, getDomainSearchPath, getJRunService, getLogger, getName, getParentService, getReference, getResourceManager, getServerName, getServerProperties, getStatus, init, invokeMethod, isInPartition, isPartition, lookup, postDeregister, postRegister, preDeregister, preRegister, requestServer, scheduleRunnable, setBindToJNDI, setDeactivated, setDomainName, setName, setParentService, start, stop, toString, unbind, unscheduleRunnable, updateStatus
 

Constructor Detail

StatefulSessionPersistenceManager

public StatefulSessionPersistenceManager(StatefulSessionContainer statefulSessionContainer)
Parameters:
statefulSessionContinaer - This is used to access the instancePool, ejbMetaData, and operations.
Method Detail

insert

public void insert(Instance instance)
Inserts the instance into the persistence store.
Parameters:
id - the ID associated with the bean.
intance - the jrun.ejb.Instance.

activate

public Instance activate(java.lang.Object id)
                  throws javax.ejb.EJBException,
                         NotPassivatedException,
                         java.rmi.RemoteException
Load the instance corresponding to id from the persistence store.
Parameters:
id - The ID associated with the bean.
Returns:
The activated instance.
Throws:
EJBException - This can be thrown by ejbActivate.
NotPassivatedException - Thrown if the instance was not found in the persistent store.
java.rmi.RemoteException - This can be thrown by ejbActivate.

passivate

public void passivate(java.lang.Object id)
Store the instance in the persistence store.
Parameters:
id - the ID associated with the bean.

remove

public void remove(java.lang.Object id)
Remove the instance from the persistence store.
Parameters:
id - the ID associated with the bean.


Copyright � 2002 Macromedia Corporation. All Rights Reserved.