Package com.sun.ejb.containers
Class AbstractSingletonContainer
java.lang.Object
com.sun.ejb.containers.BaseContainer
com.sun.ejb.containers.AbstractSingletonContainer
- All Implemented Interfaces:
Container,com.sun.enterprise.container.common.spi.JavaEEContainer,org.glassfish.enterprise.iiop.spi.EjbContainerFacade
- Direct Known Subclasses:
BMCSingletonContainer,CMCSingletonContainer
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classNested classes/interfaces inherited from class com.sun.ejb.containers.BaseContainer
BaseContainer.ContainerInfo, BaseContainer.ContainerType, BaseContainer.PreInvokeException -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ComponentContextprotected ObjectFactoryprotected booleanprotected AtomicBooleanFields inherited from class com.sun.ejb.containers.BaseContainer
_logger, cacheProbeListener, cacheProbeNotifier, callFlowInfo, componentId, CONTAINER_INITIALIZING, CONTAINER_ON_HOLD, CONTAINER_STARTED, CONTAINER_STOPPED, CONTAINER_UNDEPLOYED, containerInfo, containerState, containerStateManager, containerTransactionManager, debugMonitorFlag, ejbActivateMethod, ejbClass, ejbContainerUtilImpl, ejbDescriptor, ejbGeneratedOptionalLocalBusinessIntfClass, ejbHome, ejbHomeImpl, ejbHomeStub, ejbIntfMethodInfo, ejbIntfMethods, ejbLocalBusinessHome, ejbLocalBusinessHomeImpl, ejbLocalHome, ejbLocalHomeImpl, EJBLocalObject_getPrimaryKey, EJBObject_getPrimaryKey, ejbOptionalLocalBusinessHome, ejbOptionalLocalBusinessHomeImpl, ejbOptionalLocalBusinessHomeIntf, ejbPassivateMethod, ejbProbeListener, ejbProbeNotifier, ejbRemoteBusinessHome, ejbRemoteBusinessHomeImpl, ejbRemoteBusinessHomeStub, ejbRemoveMethod, envProps, hasLocalBusinessView, hasLocalHomeView, hasOptionalLocalBusinessView, hasRemoteBusinessView, hasRemoteHomeView, homeIntf, injectionManager, interceptorManager, invocationInfoMap, invocationManager, isBeanManagedTran, isLocal, isMessageDriven, isRemote, isSession, isSingleton, isStatefulSession, isStatelessSession, isWebServiceEndpoint, loader, localBusinessHomeIntf, localBusinessIntfs, localHomeIntf, metadata, methodMonitorMap, monitorOn, namingManager, NO_PARAMS, optIntfClassLoader, poolProbeListener, remoteBusinessHomeIntf, remoteBusinessIntfInfo, remoteHomeRefFactory, remoteIntf, scheduleIds, securityManager, sfsbSerializedClass, SINGLETON_BEAN_POOL_PROP, timerProbeListener, timerProbeNotifier, transactionManager, webServiceEndpointIntf, webServiceInvocationInfoMapFields 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
ConstructorsModifierConstructorDescriptionprotectedAbstractSingletonContainer(EjbDescriptor desc, ClassLoader loader, com.sun.enterprise.security.SecurityManager sm) This constructor is called from the JarManager when a Jar is deployed. -
Method Summary
Modifier and TypeMethodDescriptionprotected EJBContextImpl_constructEJBContextImpl(Object instance) voidactivateEJB(Object ctx, Object instanceKey) protected voidafterBegin(EJBContextImpl context) protected voidafterCompletion(EJBContextImpl ctx, int status) protected voidbeforeCompletion(EJBContextImpl context) protected voidcheckExists(EJBLocalRemoteObject ejbObj) Check if the given EJBObject/LocalObject has been removed.protected voidprotected EjbInvocationprotected EjbInvocationcreateEjbInvocation(Object ejb, ComponentContext ctx) createEJBLocalBusinessObjectImpl(boolean localBeanView) Called during internal creation of session beanCalled during client creation request through EJB LocalHome view.protected voiddoConcreteContainerShutdown(boolean appBeingUndeployed) TODO public void appendStats(StringBuffer sbuf) { sbuf.append("\nSingletonContainer: ") .append("CreateCount=").append(statCreateCount).append("; ") .append("RemoveCount=").append(statRemoveCount).append("; ") .append("]"); }protected voiddoTimerInvocationInit(EjbInvocation inv, Object primaryKey) This is implemented by concrete containers that support TimedObjects.protected voidForce destroy the EJB should be a no-op for singletons.protected EJBLocalObjectImplNot applicable to Singletonsprotected EJBObjectImplgetEJBObjectImpl(byte[] instanceKey) Not applicable to Singletonsintlongprotected EjbMonitoringStatsProvidergetMonitoringStatsProvider(String appName, String modName, String ejbName) intprotected voidCalled from the ContainerFactory during initialization.voidonReady()Called when server instance is ReadybooleanpassivateEJB(ComponentContext context) protected voidprotected voidremoveBean(EJBLocalRemoteObject ejbo, Method removeMethod, boolean local) voidbooleanuserTransactionMethodsAllowed(org.glassfish.api.invocation.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, addInvocationInfo, addLocalRemoteInvocationInfo, addProxyInterfacesSetClass, adjustHomeTargetMethodInfo, adjustInvocationInfo, assertValidLocalObject, assertValidRemoteObject, authorize, authorizeLocalGetPrimaryKey, authorizeLocalMethod, authorizeRemoteGetPrimaryKey, authorizeRemoteMethod, callEJBTimeout, cancelTimers, checkExceptionClientTx, checkUnfinishedTx, checkUserTransactionLookup, cleanupInstance, containerStateToString, createCallFlowAgent, createEjbInstanceAndContext, createEjbInstanceForInterceptors, createMonitoringRegistry, createRemoteReferenceWithId, delistExtendedEntityManagers, doAfterBegin, doEJBHomeRemove, doFlush, enlistExtendedEntityManagers, externalPostInvoke, externalPreInvoke, findFlushEnabledAttr, getApplicationId, getClassLoader, getComponentId, getContainerClassLoader, getContainerId, getContainerInfo, getContext, getDebugMonitorFlag, getDescriptor, getEJBClass, getEjbDescriptor, getEJBHome, getEJBHomeInvocationHandler, getEJBHomeStub, getEJBLocalBusinessHome, getEJBLocalHome, getEJBLocalHomeInvocationHandler, getEJBLocalObjectForPrimaryKey, getEJBLocalObjectForPrimaryKey, getEJBMetaData, getEJBObjectForPrimaryKey, getInvocationKey, getJaccEjb, getJavaGlobalJndiNamePrefix, getMonitoringMethodsArray, getMonitoringMethodsArray, getPassByReference, getPre30LifecycleMethodNames, getProtocolManager, getSecurityManager, getTargetObject, getTimeoutMethod, getTxAttr, getTxAttr, getTxAttrForLifecycleCallback, getUserTransaction, getUseThreadPoolId, incrementCreatedTimedObject, incrementDeliveredTimedObject, incrementRemovedTimedObject, initializeProtocolManager, injectEjbInstance, instantiateEJBLocalBusinessObjectImpl, instantiateEJBLocalObjectImpl, instantiateEJBLocalObjectImpl, instantiateEJBObjectImpl, instantiateEJBObjectImpl, instantiateOptionalEJBLocalBusinessObjectImpl, instantiateRemoteBusinessObjectImpl, intercept, intercept, invokeBeanMethod, invokeFindByPrimaryKey, invokeTargetBeanMethod, isApplicationException, isCreateHomeFinder, isEjbTimeoutMethod, isHAEnabled, isIdentical, isLocalInterfaceSupported, isLocalObject, isRemoteInterfaceSupported, isRemoteObject, isStopped, isSystemUncheckedException, isTimedObject, isUndeployed, lookupExtendedEntityManager, onEnteringContainer, onLeavingContainer, onShutdown, onTermination, postCreate, postEjbTimeout, postFind, postInvoke, postInvoke, postInvokeNoTx, postInvokeTx, postProcessInvocationInfo, preInitialize, preInvoke, preInvokeNoTx, preInvokeTx, prepareEjbTimeoutParams, preSelect, registerSystemInterceptor, registerTimerMonitorableComponent, releaseContext, releaseTargetObject, removeBeanUnchecked, removeBeanUnchecked, resumeTransaction, scanForEjbCreateMethod, setDebugMonitorFlag, setEJBMetaData, setStartedState, setStoppedState, setUndeployedState, startApplication, suspendTransaction, toString, undeploy, useClientTx, validateEMForClientTx, validateTxAttr, webServicePostInvoke
-
Field Details
-
singletonCtxFactory
-
singletonInitialized
-
singletonInitializationFailed
protected boolean singletonInitializationFailed -
singletonCtx
-
-
Constructor Details
-
AbstractSingletonContainer
protected AbstractSingletonContainer(EjbDescriptor desc, ClassLoader loader, com.sun.enterprise.security.SecurityManager sm) throws Exception This constructor is called from the JarManager when a Jar is deployed.- Throws:
Exception- on error
-
-
Method Details
-
getMonitorAttributeValues
-
createEjbInvocation
- Overrides:
createEjbInvocationin classBaseContainer
-
createEjbInvocation
- Overrides:
createEjbInvocationin classBaseContainer
-
initializeHome
Description copied from class:BaseContainerCalled from the ContainerFactory during initialization.- Overrides:
initializeHomein classBaseContainer- Throws:
Exception
-
registerMonitorableComponents
protected void registerMonitorableComponents()- Overrides:
registerMonitorableComponentsin classBaseContainer
-
getMonitoringStatsProvider
protected EjbMonitoringStatsProvider getMonitoringStatsProvider(String appName, String modName, String ejbName) - Specified by:
getMonitoringStatsProviderin classBaseContainer
-
onReady
public void onReady()Description copied from class:BaseContainerCalled when server instance is Ready- Specified by:
onReadyin interfaceContainer- Overrides:
onReadyin classBaseContainer
-
createRemoteBusinessObjectImpl
public EJBObjectImpl createRemoteBusinessObjectImpl() throws jakarta.ejb.CreateException, RemoteException- Throws:
jakarta.ejb.CreateExceptionRemoteException
-
createEJBObjectImpl
- Specified by:
createEJBObjectImplin classBaseContainer- Throws:
jakarta.ejb.CreateExceptionRemoteException
-
createEJBLocalObjectImpl
Called during client creation request through EJB LocalHome view.- Overrides:
createEJBLocalObjectImplin classBaseContainer- Throws:
jakarta.ejb.CreateException
-
createEJBLocalBusinessObjectImpl
public EJBLocalObjectImpl createEJBLocalBusinessObjectImpl(boolean localBeanView) throws jakarta.ejb.CreateException Called during internal creation of session bean- Throws:
jakarta.ejb.CreateException
-
removeBean
protected void removeBean(EJBLocalRemoteObject ejbo, Method removeMethod, boolean local) throws jakarta.ejb.RemoveException, jakarta.ejb.EJBException, RemoteException - Specified by:
removeBeanin classBaseContainer- Throws:
jakarta.ejb.RemoveExceptionjakarta.ejb.EJBExceptionRemoteException
-
forceDestroyBean
Force destroy the EJB should be a no-op for singletons. After Initialization completes successfully, runtime exceptions during invocations on the Singleton do not result in the instance being destroyed.- Specified by:
forceDestroyBeanin classBaseContainer
-
getEJBObjectImpl
Not applicable to Singletons- Specified by:
getEJBObjectImplin classBaseContainer
-
getEJBLocalObjectImpl
Not applicable to Singletons- Overrides:
getEJBLocalObjectImplin classBaseContainer
-
setSingletonLifeCycleManager
-
checkInit
protected void checkInit() -
instantiateSingletonInstance
-
_constructEJBContextImpl
- Overrides:
_constructEJBContextImplin classBaseContainer
-
doTimerInvocationInit
Description copied from class:BaseContainerThis is implemented by concrete containers that support TimedObjects.- Overrides:
doTimerInvocationInitin classBaseContainer- Throws:
Exception
-
userTransactionMethodsAllowed
public boolean userTransactionMethodsAllowed(org.glassfish.api.invocation.ComponentInvocation inv) Description copied from class:BaseContainerEJB 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:
userTransactionMethodsAllowedin interfaceContainer- Overrides:
userTransactionMethodsAllowedin classBaseContainer
-
checkExists
Check if the given EJBObject/LocalObject has been removed.- Overrides:
checkExistsin classBaseContainer- Throws:
jakarta.ejb.NoSuchObjectLocalException- if the object has been removed.
-
afterBegin
- Specified by:
afterBeginin classBaseContainer
-
beforeCompletion
- Specified by:
beforeCompletionin classBaseContainer
-
afterCompletion
- Specified by:
afterCompletionin classBaseContainer
-
passivateEJB
- Specified by:
passivateEJBin classBaseContainer
-
activateEJB
-
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:
doConcreteContainerShutdownin classBaseContainer
-
getMethodReadyCount
public long getMethodReadyCount() -
getMaxPoolSize
public int getMaxPoolSize() -
getSteadyPoolSize
public int getSteadyPoolSize()
-