org.jboss.ejb
Class StatefulSessionContainer

java.lang.Object
  extended by org.jboss.mx.util.JBossNotificationBroadcasterSupport
      extended by org.jboss.system.ServiceMBeanSupport
          extended by org.jboss.ejb.Container
              extended by org.jboss.ejb.SessionContainer
                  extended by org.jboss.ejb.StatefulSessionContainer
All Implemented Interfaces:
javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, AllowedOperationsFlags, ContainerMBean, EJBProxyFactoryContainer, InstancePoolContainer, org.jboss.system.Service, org.jboss.system.ServiceMBean

public class StatefulSessionContainer
extends SessionContainer
implements EJBProxyFactoryContainer, InstancePoolContainer

The container for stateful session beans.

Version:
$Revision: 57209 $
Author:
Rickard ´┐Żberg, Daniel OConnor, Marc Fleury, Scott Stark, Jason Dillon, Christoph G. Jung

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jboss.ejb.Container
Container.AbstractContainerInterceptor
 
Field Summary
protected  Method getEJBObject
           
protected  InstanceCache instanceCache
          The instance cache.
protected  StatefulSessionPersistenceManager persistenceManager
          This is the persistence manager for this container
 
Fields inherited from class org.jboss.ejb.SessionContainer
beanMapping, homeMapping, instancePool, interceptor, serviceEndpoint
 
Fields inherited from class org.jboss.ejb.Container
BASE_EJB_CONTAINER_NAME, beanClass, classLoader, createCount, EJB_CONTAINER_QUERY_NAME, EJB_TIMEOUT, ejbModule, EJBOBJECT_REMOVE, homeInterface, invokeStats, isJaccEnabled, jaccContextID, localClassLoader, localHomeInterface, localInterface, localProxyFactory, lockManager, marshalledInvocationMapping, metaData, ORB_NAME, proxyFactories, proxyFactoryTL, remoteInterface, removeCount, rm, securityProxy, sm, tm, webClassLoader
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport
log, server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.system.ServiceMBean
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED
 
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
 
Constructor Summary
StatefulSessionContainer()
           
 
Method Summary
protected  Interceptor createContainerInterceptor()
           
 javax.ejb.EJBObject createHome(Invocation mi)
           
protected  void createInstanceCache()
          creates and registers the instance cache
 javax.ejb.EJBLocalObject createLocalHome(Invocation mi)
           
protected  void createPersistenceManager()
          create persistence manager
protected  void createService()
          The EJBDeployer calls this method.
protected  void destroyInstanceCache()
           
protected  void destroyPersistenceManager()
           
 javax.ejb.EJBObject getEJBObject(Invocation mi)
          A method for the getEJBObject from the handle
 InstanceCache getInstanceCache()
           
 Set getMethodPermissions(Method m, InvocationType iface)
          Override getMethodPermissions to work around the fact that stateful session handles obtain their ejb objects by doing an invocation on the container as a home method invocation using the Handle.getEJBObject method.
 StatefulSessionPersistenceManager getPersistenceManager()
           
 void remove(Invocation mi)
           
 void removeHome(Invocation mi)
           
 void removeLocalHome(Invocation mi)
           
 void setInstanceCache(InstanceCache ic)
           
 void setPersistenceManager(StatefulSessionPersistenceManager pm)
           
protected  void setupHomeMapping()
          how home methods are treated by container
protected  void startInstanceCache()
          Start instance cache
protected  void startPersistenceManager()
          Start persistence
protected  void stopInstanceCache()
          Stop instance cache
protected  void stopPersistenceManager()
          Stop persistence
 
Methods inherited from class org.jboss.ejb.SessionContainer
addInterceptor, checkCoherency, createInstancePool, createInterceptors, createInvokers, destroyInstancePool, destroyInterceptors, destroyInvokers, destroyMarshalledInvocationMapping, destroyService, getBeanMapping, getEJBHome, getEJBLocalHome, getEJBMetaDataHome, getEJBMetaDataHome, getHandle, getHomeHandleHome, getHomeHandleHome, getHomeMapping, getInstancePool, getInterceptor, getLocalProxyFactory, getPrimaryKey, getPrimaryKey, getServiceEndpoint, internalInvoke, internalInvokeHome, isIdentical, setInstancePool, setupBeanMapping, setUpBeanMappingImpl, setupMarshalledInvocationMapping, startInstancePool, startInterceptors, startInvokers, startService, stopInstancePool, stopInterceptors, stopInvokers, stopService
 
Methods inherited from class org.jboss.ejb.Container
addProxyFactory, createBeanClassInstance, getBeanClass, getBeanMetaData, getClassLoader, getCreateCount, getDeploymentInfo, getEjbModule, getEnvContext, getHomeClass, getInvokeStats, getJaccContextID, getJmxName, getLocalClass, getLocalClassLoader, getLocalHomeClass, getLockManager, getMessageDestination, getProxyFactory, getRealmMapping, getRemoteClass, getRemoveCount, getSecurityManager, getSecurityProxy, getTimerService, getTransactionManager, getWebClassLoader, invoke, isCallByValue, isJaccEnabled, lookupProxyFactory, removeTimerService, restoreTimers, setBeanMetaData, setClassLoader, setDeploymentInfo, setEjbModule, setJaccContextID, setJaccEnabled, setLocalClassLoader, setLockManager, setProxyFactory, setRealmMapping, setSecurityManager, setSecurityProxy, setTransactionManager, setWebClassLoader
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport
create, destroy, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, stop
 
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport
addNotificationListener, getNotificationInfo, handleNotification, nextNotificationSequenceNumber, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.ejb.EJBProxyFactoryContainer
getHomeClass, getLocalClass, getLocalHomeClass, getLocalProxyFactory, getProxyFactory, getRemoteClass
 
Methods inherited from interface org.jboss.ejb.InstancePoolContainer
getInstancePool
 
Methods inherited from interface org.jboss.system.ServiceMBean
getName, getState, getStateString, jbossInternalLifecycle
 
Methods inherited from interface org.jboss.system.Service
create, destroy, start, stop
 

Field Detail

persistenceManager

protected StatefulSessionPersistenceManager persistenceManager
This is the persistence manager for this container


instanceCache

protected InstanceCache instanceCache
The instance cache.


getEJBObject

protected Method getEJBObject
Constructor Detail

StatefulSessionContainer

public StatefulSessionContainer()
Method Detail

setInstanceCache

public void setInstanceCache(InstanceCache ic)

getInstanceCache

public InstanceCache getInstanceCache()

getPersistenceManager

public StatefulSessionPersistenceManager getPersistenceManager()

setPersistenceManager

public void setPersistenceManager(StatefulSessionPersistenceManager pm)

getMethodPermissions

public Set getMethodPermissions(Method m,
                                InvocationType iface)
Override getMethodPermissions to work around the fact that stateful session handles obtain their ejb objects by doing an invocation on the container as a home method invocation using the Handle.getEJBObject method.

Overrides:
getMethodPermissions in class Container
Parameters:
m -
iface -
Returns:

createService

protected void createService()
                      throws Exception
Description copied from class: Container
The EJBDeployer calls this method. The EJBDeployer has set all the plugins and interceptors that this bean requires and now proceeds to initialize the chain. The method looks for the standard classes in the URL, sets up the naming environment of the bean. The concrete container classes should override this method to introduce implementation specific initialization behaviour.

Overrides:
createService in class SessionContainer
Throws:
Exception - if loading the bean class failed (ClassNotFoundException) or setting up "java:" naming environment failed (DeploymentException)

createInstanceCache

protected void createInstanceCache()
                            throws Exception
creates and registers the instance cache

Overrides:
createInstanceCache in class SessionContainer
Throws:
Exception

createPersistenceManager

protected void createPersistenceManager()
                                 throws Exception
create persistence manager

Overrides:
createPersistenceManager in class SessionContainer
Throws:
Exception

startPersistenceManager

protected void startPersistenceManager()
                                throws Exception
Start persistence

Overrides:
startPersistenceManager in class SessionContainer
Throws:
Exception

startInstanceCache

protected void startInstanceCache()
                           throws Exception
Start instance cache

Overrides:
startInstanceCache in class SessionContainer
Throws:
Exception

stopPersistenceManager

protected void stopPersistenceManager()
Stop persistence

Overrides:
stopPersistenceManager in class SessionContainer

stopInstanceCache

protected void stopInstanceCache()
Stop instance cache

Overrides:
stopInstanceCache in class SessionContainer

destroyPersistenceManager

protected void destroyPersistenceManager()
Overrides:
destroyPersistenceManager in class SessionContainer

destroyInstanceCache

protected void destroyInstanceCache()
Overrides:
destroyInstanceCache in class SessionContainer

remove

public void remove(Invocation mi)
            throws RemoteException,
                   javax.ejb.RemoveException
Throws:
RemoteException
javax.ejb.RemoveException

createHome

public javax.ejb.EJBObject createHome(Invocation mi)
                               throws Exception
Throws:
Exception

removeLocalHome

public void removeLocalHome(Invocation mi)
                     throws RemoteException,
                            javax.ejb.RemoveException
Throws:
Error - Not yet implemented
RemoteException
javax.ejb.RemoveException

createLocalHome

public javax.ejb.EJBLocalObject createLocalHome(Invocation mi)
                                         throws Exception
Throws:
Exception

getEJBObject

public javax.ejb.EJBObject getEJBObject(Invocation mi)
                                 throws RemoteException
A method for the getEJBObject from the handle

Throws:
RemoteException

removeHome

public void removeHome(Invocation mi)
                throws RemoteException,
                       javax.ejb.RemoveException
Throws:
Error - Not yet implemented
RemoteException
javax.ejb.RemoveException

setupHomeMapping

protected void setupHomeMapping()
                         throws Exception
Description copied from class: SessionContainer
how home methods are treated by container

Specified by:
setupHomeMapping in class SessionContainer
Throws:
Exception

createContainerInterceptor

protected Interceptor createContainerInterceptor()


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