public final class StatefulSessionContainer extends BaseContainer implements CacheListener, SFSBContainerCallback
BaseContainer.ContainerInfo, BaseContainer.ContainerType, BaseContainer.PreInvokeException| Modifier and Type | Field and Description |
|---|---|
static int |
MIN_PASSIVATION_BATCH_COUNT |
cacheProbeListener, cacheProbeNotifier, callFlowInfo, componentId, CONTAINER_INITIALIZING, CONTAINER_ON_HOLD, CONTAINER_STARTED, CONTAINER_STOPPED, CONTAINER_UNDEPLOYED, containerInfo, containerState, containerStateManager, containerTransactionManager, containerType, 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, executorProbeListener, hasLocalBusinessView, hasLocalHomeView, hasOptionalLocalBusinessView, hasRemoteBusinessView, hasRemoteHomeView, homeIntf, injectionManager, interceptorManager, invocationInfoMap, invocationManager, isBeanManagedTran, isLocal, isMessageDriven, isRemote, isSession, isSingleton, isStatefulSession, isStatelessSession, isWebServiceEndpoint, loader, localBusinessHomeIntf, localBusinessIntfs, localHomeIntf, logParams, metadata, methodMonitorMap, monitorOn, namingManager, NO_PARAMS, optIntfClassLoader, poolProbeListener, remoteBusinessHomeIntf, remoteBusinessIntfInfo, remoteHomeRefFactory, remoteIntf, scheduleIds, securityManager, sfsbSerializedClass, SINGLETON_BEAN_POOL_PROP, timerProbeListener, timerProbeNotifier, transactionManager, webServiceEndpointIntf, webServiceInvocationInfoMapSEC_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 and Description |
|---|
StatefulSessionContainer(BaseContainer.ContainerType conType,
EjbDescriptor desc,
ClassLoader loader,
SecurityManager sm) |
StatefulSessionContainer(EjbDescriptor desc,
ClassLoader loader,
SecurityManager sm)
This constructor is called from the JarManager when a Jar is deployed.
|
| Modifier and Type | Method and Description |
|---|---|
protected EJBContextImpl |
_constructEJBContextImpl(Object instance) |
protected Object |
_constructEJBInstance() |
ComponentContext |
_getContext(EjbInvocation ejbInvocation)
Called from preInvoke which is called from the EJBObject
for local and remote invocations.
|
void |
activateEJB(Object sessionKey,
StatefulEJBContext sfsbCtx,
Object cookie) |
protected void |
afterBegin(EJBContextImpl context) |
protected void |
afterCompletion(EJBContextImpl context,
int status) |
protected void |
beforeCompletion(EJBContextImpl context) |
boolean |
canPassivateEJB(ComponentContext context) |
protected void |
checkExists(EJBLocalRemoteObject ejbObj)
Check if the given EJBObject/LocalObject has been removed.
|
protected void |
checkUnfinishedTx(Transaction prevTx,
EjbInvocation inv) |
protected EJBLocalObjectImpl |
createEJBLocalObjectImpl()
This is called from the generated "HelloEJBLocalHomeImpl" create method
via EJBLocalHomeImpl.createEJBObject.
|
protected EJBObjectImpl |
createEJBObjectImpl()
This is called from the generated "HelloEJBHomeImpl" create method
via EJBHomeImpl.createEJBObject.
|
protected EJBObjectImpl |
createRemoteBusinessObjectImpl() |
void |
decrementMethodReadyStat() |
protected void |
delistExtendedEntityManagers(ComponentContext ctx) |
Object |
deserializeData(byte[] data) |
protected void |
doConcreteContainerShutdown(boolean appBeingUndeployed) |
protected void |
enlistExtendedEntityManagers(ComponentContext ctx) |
protected void |
forceDestroyBean(EJBContextImpl ctx)
Force destroy the EJB and rollback any Tx it was associated with
Called from removeBean, timeoutBean and BaseContainer.postInvokeTx.
|
org.glassfish.ha.store.api.BackingStore<Serializable,org.glassfish.ha.store.util.SimpleMetadata> |
getBackingStore() |
protected EJBLocalObjectImpl |
getEJBLocalObjectImpl(Object sessionKey)
Called from EJBLocalObjectImpl.getLocalObject() while deserializing
a local object reference.
|
protected EJBObjectImpl |
getEJBObjectImpl(byte[] instanceKey)
Called when a remote invocation arrives for an EJB.
|
int |
getMaxCacheSize() |
long |
getMethodReadyCount() |
String |
getMonitorAttributeValues() |
protected EjbMonitoringStatsProvider |
getMonitoringStatsProvider(String appName,
String modName,
String ejbName) |
int |
getPassivationBatchCount() |
long |
getPassiveCount() |
protected String[] |
getPre30LifecycleMethodNames() |
void |
incrementMethodReadyStat() |
protected void |
initializeHome()
Called from the ContainerFactory during initialization.
|
void |
invokePeriodically(long delay,
long periodicity,
Runnable target) |
boolean |
isHAEnabled() |
protected boolean |
isIdentical(EJBObjectImpl ejbo,
javax.ejb.EJBObject other) |
boolean |
isPassivationCapable() |
protected void |
loadCheckpointInfo() |
javax.persistence.EntityManager |
lookupExtendedEntityManager(javax.persistence.EntityManagerFactory emf)
Containers that allow extended EntityManager will override this method.
|
void |
onUndeploy(StatefulEJBContext sfsbCtx) |
boolean |
passivateEJB(ComponentContext context) |
boolean |
passivateEJB(StatefulEJBContext sfsbCtx) |
protected void |
postInvokeTx(EjbInvocation inv)
postInvokeTx is called after every invocation on the EJB instance,
including ejbCreate/ejbFind---/ejbRemove.
|
protected void |
registerMonitorableComponents() |
void |
releaseContext(EjbInvocation inv)
Called from preInvoke which is called from the EJBObject for local and
remote invocations.
|
protected void |
removeBean(EJBLocalRemoteObject ejbo,
Method removeMethod,
boolean local) |
void |
removeExpiredSessions() |
void |
removeTimedoutBean(EJBContextImpl ctx) |
protected boolean |
resumeTransaction(EjbInvocation inv) |
byte[] |
serializeContext(StatefulEJBContext ctx) |
void |
setBackingStore(org.glassfish.ha.store.api.BackingStore<Serializable,org.glassfish.ha.store.util.SimpleMetadata> store) |
void |
setHAEnabled(boolean isHAEnabled) |
void |
setPassivationBatchCount(int count) |
void |
setRemovalGracePeriodInSeconds(int val) |
void |
setSessionCache(LruSessionCache cache) |
void |
setSFSBUUIDUtil(SFSBUUIDUtil util) |
void |
setSFSBVersionManager(SFSBVersionManager sfsbVersionManager) |
protected boolean |
suspendTransaction(EjbInvocation inv) |
void |
trimEvent(Object primaryKey,
Object context)
an cached value is trimmed (to prevent cache overflow)
|
void |
undeploy(SessionContextImpl ctx) |
boolean |
userTransactionMethodsAllowed(ComponentInvocation inv)
EJB spec makes a distinction between access to the UserTransaction
object itself and access to its methods.
|
protected void |
validateEMForClientTx(EjbInvocation inv,
JavaEETransaction clientJ2EETx) |
addInvocationInfo, addLocalRemoteInvocationInfo, addProxyInterfacesSetClass, adjustHomeTargetMethodInfo, adjustInvocationInfo, assertValidLocalObject, assertValidRemoteObject, authorize, authorizeLocalGetPrimaryKey, authorizeLocalMethod, authorizeRemoteGetPrimaryKey, authorizeRemoteMethod, callEJBTimeout, cancelTimers, checkExceptionClientTx, checkUserTransactionLookup, cleanupInstance, containerStateToString, createCallFlowAgent, createEjbInstance, createEjbInstanceAndContext, createEjbInvocation, createEjbInvocation, createMonitoringRegistry, createRemoteReferenceWithId, doAfterBegin, doEJBHomeRemove, doFlush, doTimerInvocationInit, externalPostInvoke, externalPreInvoke, findFlushEnabledAttr, getApplicationId, getClassLoader, getComponentId, getContainerClassLoader, getContainerId, getContainerType, getContext, getDebugMonitorFlag, getDescriptor, getEJBClass, getEjbDescriptor, getEJBHome, getEJBHomeInvocationHandler, getEJBHomeStub, getEJBLocalBusinessHome, getEJBLocalHome, getEJBLocalHomeInvocationHandler, getEJBLocalObjectForPrimaryKey, getEJBLocalObjectForPrimaryKey, getEJBMetaData, getEJBObjectForPrimaryKey, getInvocationKey, getJaccEjb, getJavaGlobalJndiNamePrefix, getMonitoringMethodsArray, getMonitoringMethodsArray, getPassByReference, 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, isLocalInterfaceSupported, isLocalObject, isRemoteInterfaceSupported, isRemoteObject, isStopped, isSystemUncheckedException, isTimedObject, isUndeployed, onEnteringContainer, onLeavingContainer, onReady, onShutdown, onTermination, postCreate, postEjbTimeout, postFind, postInvoke, postInvoke, postInvokeNoTx, postProcessInvocationInfo, preInitialize, preInvoke, preInvokeNoTx, preInvokeTx, prepareEjbTimeoutParams, preSelect, registerTimerMonitorableComponent, releaseTargetObject, removeBeanUnchecked, removeBeanUnchecked, scanForEjbCreateMethod, setDebugMonitorFlag, setEJBMetaData, setStartedState, setStoppedState, setUndeployedState, startApplication, toString, undeploy, useClientTx, validateTxAttr, webServicePostInvokeclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetClassLoaderpublic static final int MIN_PASSIVATION_BATCH_COUNT
public StatefulSessionContainer(EjbDescriptor desc, ClassLoader loader, SecurityManager sm) throws Exception
Exception - on errorpublic StatefulSessionContainer(BaseContainer.ContainerType conType, EjbDescriptor desc, ClassLoader loader, SecurityManager sm) throws Exception
Exceptionpublic boolean isPassivationCapable()
isPassivationCapable in interface SFSBContainerCallbackprotected void initializeHome()
throws Exception
BaseContainerinitializeHome in class BaseContainerExceptionprotected void checkUnfinishedTx(Transaction prevTx, EjbInvocation inv)
checkUnfinishedTx in class BaseContainerprotected void loadCheckpointInfo()
protected void registerMonitorableComponents()
registerMonitorableComponents in class BaseContainerpublic String getMonitorAttributeValues()
protected EjbMonitoringStatsProvider getMonitoringStatsProvider(String appName, String modName, String ejbName)
getMonitoringStatsProvider in class BaseContainerprotected boolean isIdentical(EJBObjectImpl ejbo, javax.ejb.EJBObject other) throws RemoteException
isIdentical in class BaseContainerRemoteExceptionprotected EJBObjectImpl createEJBObjectImpl() throws javax.ejb.CreateException, RemoteException
createEJBObjectImpl in class BaseContainerjavax.ejb.CreateExceptionRemoteExceptionprotected EJBObjectImpl createRemoteBusinessObjectImpl() throws javax.ejb.CreateException, RemoteException
javax.ejb.CreateExceptionRemoteExceptionprotected EJBLocalObjectImpl createEJBLocalObjectImpl() throws javax.ejb.CreateException
createEJBLocalObjectImpl in class BaseContainerjavax.ejb.CreateExceptionprotected EJBContextImpl _constructEJBContextImpl(Object instance)
_constructEJBContextImpl in class BaseContainerprotected Object _constructEJBInstance() throws Exception
_constructEJBInstance in class BaseContainerExceptionprotected boolean suspendTransaction(EjbInvocation inv) throws Exception
suspendTransaction in class BaseContainerExceptionprotected boolean resumeTransaction(EjbInvocation inv) throws Exception
resumeTransaction in class BaseContainerExceptionpublic javax.persistence.EntityManager lookupExtendedEntityManager(javax.persistence.EntityManagerFactory emf)
BaseContainerlookupExtendedEntityManager in interface JavaEEContainerlookupExtendedEntityManager in class BaseContainerprotected void removeBean(EJBLocalRemoteObject ejbo, Method removeMethod, boolean local) throws javax.ejb.RemoveException, javax.ejb.EJBException
removeBean in class BaseContainerjavax.ejb.RemoveExceptionjavax.ejb.EJBExceptionprotected void forceDestroyBean(EJBContextImpl ctx)
forceDestroyBean in class BaseContainerpublic boolean userTransactionMethodsAllowed(ComponentInvocation inv)
BaseContaineruserTransactionMethodsAllowed in interface ContaineruserTransactionMethodsAllowed in class BaseContainerpublic void removeTimedoutBean(EJBContextImpl ctx)
protected EJBObjectImpl getEJBObjectImpl(byte[] instanceKey)
BaseContainergetEJBObjectImpl in class BaseContainerprotected EJBLocalObjectImpl getEJBLocalObjectImpl(Object sessionKey)
getEJBLocalObjectImpl in class BaseContainerprotected void checkExists(EJBLocalRemoteObject ejbObj)
checkExists in class BaseContainerjavax.ejb.NoSuchObjectLocalException - if the object has been removed.public ComponentContext _getContext(EjbInvocation ejbInvocation)
_getContext in class BaseContainerpublic boolean isHAEnabled()
isHAEnabled in class BaseContainerprotected void postInvokeTx(EjbInvocation inv) throws Exception
BaseContainerpostInvokeTx in class BaseContainerExceptionpublic void releaseContext(EjbInvocation inv)
releaseContext in class BaseContainerprotected void afterBegin(EJBContextImpl context)
afterBegin in class BaseContainerprotected void beforeCompletion(EJBContextImpl context)
beforeCompletion in class BaseContainerprotected void afterCompletion(EJBContextImpl context, int status)
afterCompletion in class BaseContainerpublic final boolean canPassivateEJB(ComponentContext context)
public final boolean passivateEJB(ComponentContext context)
passivateEJB in class BaseContainerpublic final int getPassivationBatchCount()
getPassivationBatchCount in interface SFSBContainerCallbackpublic final void setPassivationBatchCount(int count)
public final boolean passivateEJB(StatefulEJBContext sfsbCtx)
passivateEJB in interface SFSBContainerCallbackpublic long getMethodReadyCount()
public long getPassiveCount()
public void activateEJB(Object sessionKey, StatefulEJBContext sfsbCtx, Object cookie)
activateEJB in interface SFSBContainerCallbackpublic byte[] serializeContext(StatefulEJBContext ctx) throws IOException
serializeContext in interface SFSBContainerCallbackIOExceptionpublic Object deserializeData(byte[] data) throws Exception
deserializeData in interface SFSBContainerCallbackExceptionprotected void validateEMForClientTx(EjbInvocation inv, JavaEETransaction clientJ2EETx) throws javax.ejb.EJBException
validateEMForClientTx in class BaseContainerjavax.ejb.EJBExceptionprotected void enlistExtendedEntityManagers(ComponentContext ctx)
enlistExtendedEntityManagers in class BaseContainerprotected void delistExtendedEntityManagers(ComponentContext ctx)
delistExtendedEntityManagers in class BaseContainerpublic void invokePeriodically(long delay,
long periodicity,
Runnable target)
invokePeriodically in interface SFSBContainerCallbackpublic void onUndeploy(StatefulEJBContext sfsbCtx)
protected String[] getPre30LifecycleMethodNames()
getPre30LifecycleMethodNames in class BaseContainerprotected void doConcreteContainerShutdown(boolean appBeingUndeployed)
doConcreteContainerShutdown in class BaseContainerpublic void undeploy(SessionContextImpl ctx)
public void trimEvent(Object primaryKey, Object context)
CacheListenertrimEvent in interface CacheListenerprimaryKey - lookup keycontext - value of the cached entitypublic void setSFSBUUIDUtil(SFSBUUIDUtil util)
public void setHAEnabled(boolean isHAEnabled)
public void setSessionCache(LruSessionCache cache)
public void setRemovalGracePeriodInSeconds(int val)
public void removeExpiredSessions()
public void setSFSBVersionManager(SFSBVersionManager sfsbVersionManager)
public int getMaxCacheSize()
public org.glassfish.ha.store.api.BackingStore<Serializable,org.glassfish.ha.store.util.SimpleMetadata> getBackingStore()
public void setBackingStore(org.glassfish.ha.store.api.BackingStore<Serializable,org.glassfish.ha.store.util.SimpleMetadata> store)
public void incrementMethodReadyStat()
public void decrementMethodReadyStat()
Copyright © 2017. All rights reserved.