com.sun.ejb.containers
Class AbstractSingletonContainer

java.lang.Object
  extended by com.sun.ejb.containers.BaseContainer
      extended by com.sun.ejb.containers.AbstractSingletonContainer
All Implemented Interfaces:
Container, JavaEEContainer, EjbContainerFacade
Direct Known Subclasses:
BMCSingletonContainer, CMCSingletonContainer

public abstract class AbstractSingletonContainer
extends BaseContainer


Nested Class Summary
protected  class AbstractSingletonContainer.SingletonContextFactory
           
 
Nested classes/interfaces inherited from class com.sun.ejb.containers.BaseContainer
BaseContainer.ContainerType
 
Field Summary
protected  ComponentContext singletonCtx
           
protected  ObjectFactory singletonCtxFactory
           
protected  boolean singletonInitializationFailed
           
protected  java.util.concurrent.atomic.AtomicBoolean singletonInitialized
           
 
Fields inherited from class com.sun.ejb.containers.BaseContainer
_logger, cacheProbeListener, cacheProbeNotifier, callFlowInfo, cmtTimeoutInSeconds, componentId, CONTAINER_INITIALIZING, CONTAINER_ON_HOLD, CONTAINER_STARTED, CONTAINER_STOPPED, CONTAINER_UNDEPLOYED, containerInfo, containerState, containerType, debugMonitorFlag, ejbActivateMethod, ejbClass, ejbContainerUtilImpl, ejbDescriptor, ejbGeneratedOptionalLocalBusinessIntfClass, ejbHome, ejbHomeImpl, ejbHomeStub, ejbIntfMethodInfo, ejbIntfMethods, ejbLocalBusinessHome, ejbLocalBusinessHomeImpl, ejbLocalHome, ejbLocalHomeImpl, ejbMethodStatsManager, ejbOptionalLocalBusinessHome, ejbOptionalLocalBusinessHomeImpl, ejbOptionalLocalBusinessHomeIntf, ejbPassivateMethod, ejbProbeListener, ejbProbeNotifier, ejbRemoteBusinessHome, ejbRemoteBusinessHomeImpl, ejbRemoteBusinessHomeStub, ejbRemoveMethod, ejbTimeoutMethod, envProps, hasLocalBusinessView, hasLocalHomeView, hasOptionalLocalBusinessView, hasRemoteBusinessView, hasRemoteHomeView, homeIntf, injectionManager, interceptorManager, invocationInfoMap, invocationManager, isEntity, isLocal, isMessageDriven, isRemote, isSession, isSingleton, isStatefulSession, isStatelessSession, isWebServiceEndpoint, lifecycleCallbackAnnotationClasses, loader, localBusinessHomeIntf, localBusinessIntfs, localHomeIntf, logParams, metadata, methodMonitorMap, monitorOn, namingManager, NO_PARAMS, optIntfClassLoader, poolProbeListener, registryMediator, remoteBusinessHomeIntf, remoteBusinessIntfInfo, remoteHomeRefFactory, remoteIntf, scheduleIds, securityManager, sfsbSerializedClass, SINGLETON_BEAN_POOL_PROP, timerProbeListener, timerProbeNotifier, transactionManager, webServiceEndpointIntf, webServiceInvocationInfoMap
 
Fields inherited from interface com.sun.ejb.Container
SEC_CHECKED, SEC_EXCLUDED, SEC_NOT_INITIALIZED, SEC_UNCHECKED, secAttrStrings, TX_BEAN_MANAGED, TX_MANDATORY, TX_NEVER, TX_NOT_INITIALIZED, TX_NOT_SUPPORTED, TX_REQUIRED, TX_REQUIRES_NEW, TX_SUPPORTS, txAttrStrings
 
Constructor Summary
protected AbstractSingletonContainer(EjbDescriptor desc, java.lang.ClassLoader loader)
          This constructor is called from the JarManager when a Jar is deployed.
 
Method Summary
protected  EJBContextImpl _constructEJBContextImpl(java.lang.Object instance)
           
 void activateEJB(java.lang.Object ctx, java.lang.Object instanceKey)
           
protected  void checkInit()
           
protected  void checkUnfinishedTx(Transaction prevTx, EjbInvocation inv)
           
 EJBLocalObjectImpl createEJBLocalBusinessObjectImpl(boolean localBeanView)
          Called during internal creation of session bean
 EJBLocalObjectImpl createEJBLocalObjectImpl()
          Called during client creation request through EJB LocalHome view.
 EJBObjectImpl createEJBObjectImpl()
           
 EJBObjectImpl createRemoteBusinessObjectImpl()
           
protected  void doConcreteContainerShutdown(boolean appBeingUndeployed)
          TODO public void appendStats(StringBuffer sbuf) { sbuf.append("\nSingletonContainer: ") .append("CreateCount=").append(statCreateCount).append("; ") .append("RemoveCount=").append(statRemoveCount).append("; ") .append("]"); }
 int getMaxPoolSize()
           
 long getMethodReadyCount()
           
 java.lang.String getMonitorAttributeValues()
           
protected  EjbMonitoringStatsProvider getMonitoringStatsProvider(java.lang.String appName, java.lang.String modName, java.lang.String ejbName)
           
 int getSteadyPoolSize()
           
protected  void initializeHome()
          Called from the ContainerFactory during initialization.
 ComponentContext instantiateSingletonInstance()
           
 void onReady()
          Called when server instance is Ready
 boolean passivateEJB(ComponentContext context)
           
protected  void registerMonitorableComponents()
           
 void setSingletonLifeCycleManager(SingletonLifeCycleManager lcm)
           
 boolean userTransactionMethodsAllowed(ComponentInvocation inv)
          EJB spec makes a distinction between access to the UserTransaction object itself and access to its methods.
 
Methods inherited from class com.sun.ejb.containers.BaseContainer
_constructEJBInstance, _getContext, addSchedule, assertValidLocalObject, assertValidRemoteObject, authorize, checkExceptionClientTx, checkUserTransactionLookup, cleanupInstance, containerStateToString, createCallFlowAgent, createEjbInstanceAndContext, createMonitoringRegistryMediator, createRemoteReferenceWithId, doAfterBegin, doEJBHomeRemove, doFlush, enlistExtendedEntityManagers, externalPostInvoke, externalPreInvoke, findFlushEnabledAttr, findTxAttr, getClassLoader, getComponentId, getContainerClassLoader, getContainerType, getContext, getDebugMonitorFlag, getDescriptor, getEJBClass, getEjbDescriptor, getEJBHome, getEJBHomeStub, getEJBLocalBusinessHome, getEJBLocalHome, getEJBLocalObjectForPrimaryKey, getEJBLocalObjectForPrimaryKey, getEJBMetaData, getEJBObjectForPrimaryKey, getJaccEjb, getJavaGlobalJndiNamePrefix, getMonitoringMethodsArray, getMonitoringMethodsArray, getPre30LifecycleMethodNames, getProtocolManager, getSecurityManager, getTargetObject, getTxAttr, getTxAttr, incrementCreatedTimedObject, incrementDeliveredTimedObject, incrementRemovedTimedObject, injectEjbInstance, instantiateEJBLocalBusinessObjectImpl, instantiateEJBLocalObjectImpl, instantiateEJBObjectImpl, instantiateOptionalEJBLocalBusinessObjectImpl, instantiateRemoteBusinessObjectImpl, invokeBeanMethod, isAppExceptionRequiringRollback, isApplicationException, isHAEnabled, isLocalInterfaceSupported, isRemoteInterfaceSupported, isStopped, isSystemUncheckedException, isTimedObject, isUndeployed, lookupExtendedEntityManager, onShutdown, onTermination, populateMethodMonitorMap, populateMethodMonitorMap, populateMethodMonitorMap, postCreate, postFind, postInvoke, postInvoke, postInvokeTx, postProcessInvocationInfo, preInitialize, preInvoke, preInvokeTx, preSelect, registerTimerMonitorableComponent, registerTxAttrForMethod, releaseContext, releaseTargetObject, removeBeanUnchecked, removeBeanUnchecked, setDebugMonitorFlag, setMonitorOn, setSecurityManager, setStartedState, setStoppedState, setUndeployedState, startApplication, toString, undeploy, useClientTx, webServicePostInvoke
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

singletonCtxFactory

protected ObjectFactory singletonCtxFactory

singletonInitialized

protected java.util.concurrent.atomic.AtomicBoolean singletonInitialized

singletonInitializationFailed

protected boolean singletonInitializationFailed

singletonCtx

protected volatile ComponentContext singletonCtx
Constructor Detail

AbstractSingletonContainer

protected AbstractSingletonContainer(EjbDescriptor desc,
                                     java.lang.ClassLoader loader)
                              throws java.lang.Exception
This constructor is called from the JarManager when a Jar is deployed.

Throws:
java.lang.Exception - on error
Method Detail

getMonitorAttributeValues

public java.lang.String getMonitorAttributeValues()

initializeHome

protected void initializeHome()
                       throws java.lang.Exception
Description copied from class: BaseContainer
Called from the ContainerFactory during initialization.

Throws:
java.lang.Exception

checkUnfinishedTx

protected void checkUnfinishedTx(Transaction prevTx,
                                 EjbInvocation inv)
Overrides:
checkUnfinishedTx in class BaseContainer

registerMonitorableComponents

protected void registerMonitorableComponents()
Overrides:
registerMonitorableComponents in class BaseContainer

getMonitoringStatsProvider

protected EjbMonitoringStatsProvider getMonitoringStatsProvider(java.lang.String appName,
                                                                java.lang.String modName,
                                                                java.lang.String ejbName)
Specified by:
getMonitoringStatsProvider in class BaseContainer

onReady

public void onReady()
Description copied from class: BaseContainer
Called when server instance is Ready

Specified by:
onReady in interface Container
Overrides:
onReady in class BaseContainer

createRemoteBusinessObjectImpl

public EJBObjectImpl createRemoteBusinessObjectImpl()
                                             throws CreateException,
                                                    java.rmi.RemoteException
Throws:
CreateException
java.rmi.RemoteException

createEJBObjectImpl

public EJBObjectImpl createEJBObjectImpl()
                                  throws CreateException,
                                         java.rmi.RemoteException
Throws:
CreateException
java.rmi.RemoteException

createEJBLocalObjectImpl

public EJBLocalObjectImpl createEJBLocalObjectImpl()
                                            throws CreateException
Called during client creation request through EJB LocalHome view.

Throws:
CreateException

createEJBLocalBusinessObjectImpl

public EJBLocalObjectImpl createEJBLocalBusinessObjectImpl(boolean localBeanView)
                                                    throws CreateException
Called during internal creation of session bean

Throws:
CreateException

setSingletonLifeCycleManager

public void setSingletonLifeCycleManager(SingletonLifeCycleManager lcm)

checkInit

protected void checkInit()

instantiateSingletonInstance

public ComponentContext instantiateSingletonInstance()

_constructEJBContextImpl

protected EJBContextImpl _constructEJBContextImpl(java.lang.Object instance)
Overrides:
_constructEJBContextImpl in class BaseContainer

userTransactionMethodsAllowed

public boolean userTransactionMethodsAllowed(ComponentInvocation inv)
Description copied from class: BaseContainer
EJB spec makes a distinction between access to the UserTransaction object itself and access to its methods. getUserTransaction covers the first check and this method covers the second. It is called by the UserTransaction implementation to verify access.

Specified by:
userTransactionMethodsAllowed in interface Container
Overrides:
userTransactionMethodsAllowed in class BaseContainer

passivateEJB

public boolean passivateEJB(ComponentContext context)

activateEJB

public void activateEJB(java.lang.Object ctx,
                        java.lang.Object instanceKey)

doConcreteContainerShutdown

protected void doConcreteContainerShutdown(boolean appBeingUndeployed)
TODO public void appendStats(StringBuffer sbuf) { sbuf.append("\nSingletonContainer: ") .append("CreateCount=").append(statCreateCount).append("; ") .append("RemoveCount=").append(statRemoveCount).append("; ") .append("]"); }

Specified by:
doConcreteContainerShutdown in class BaseContainer

getMethodReadyCount

public long getMethodReadyCount()

getMaxPoolSize

public int getMaxPoolSize()

getSteadyPoolSize

public int getSteadyPoolSize()


Copyright © 2012 GlassFish Community. All Rights Reserved.