public class StatelessSessionContainer extends BaseContainer
At deployment time, one instance of the StatelessSessionContainer is created for each stateless SessionBean type (i.e. deployment descriptor) in a JAR.
The three states of a Stateless EJB (an EJB can be in only one state at a time):
This container services invocations using a pool of EJB instances. An instance is returned to the pool immediately after the invocation completes, so the # of instances needed = # of concurrent invocations.
A Stateless Bean can hold open DB connections across invocations. It is assumed that the Resource Manager can handle multiple incomplete transactions on the same connection.
Modifier and Type | Class and Description |
---|---|
protected class |
StatelessSessionContainer.SessionContextFactory |
BaseContainer.ContainerInfo, BaseContainer.ContainerType, BaseContainer.PreInvokeException
_logger, 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, jcdiService, loader, localBusinessHomeIntf, localBusinessIntfs, localHomeIntf, logParams, metadata, namingManager, NO_PARAMS, optIntfClassLoader, poolProbeListener, remoteBusinessHomeIntf, remoteBusinessIntfInfo, remoteHomeRefFactory, remoteIntf, scheduleIds, securityManager, sfsbSerializedClass, SINGLETON_BEAN_POOL_PROP, timerProbeListener, timerProbeNotifier, transactionManager, webServiceEndpointIntf, webServiceInvocationInfoMap
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
Modifier | Constructor and Description |
---|---|
protected |
StatelessSessionContainer(BaseContainer.ContainerType conType,
EjbDescriptor desc,
ClassLoader loader,
SecurityManager sm) |
Modifier and Type | Method and Description |
---|---|
protected SessionContextImpl |
_constructEJBContextImpl(Object instance)
Must be overridden for any container that supports injection
|
protected ComponentContext |
_getContext(EjbInvocation inv)
Called from preInvoke which is called from the EJBObject
for local and remote invocations.
|
void |
activateEJB(Object ctx,
Object instanceKey)
Deprecated.
not called and not used in Payara 5
|
protected void |
afterBegin(EJBContextImpl context) |
protected void |
afterCompletion(EJBContextImpl ctx,
int status) |
protected void |
beforeCompletion(EJBContextImpl context) |
protected void |
checkExists(EJBLocalRemoteObject ejbObj)
Check if the given EJBObject/LocalObject has been removed.
|
protected void |
createBeanPool() |
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) |
protected void |
doTimerInvocationInit(EjbInvocation inv,
Object primaryKey)
This is implemented by concrete containers that support TimedObjects.
|
protected void |
forceDestroyBean(EJBContextImpl sc)
Force destroy the EJB.
|
protected EJBLocalObjectImpl |
getEJBLocalObjectImpl(Object key)
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 |
getMaxPoolSize() |
long |
getMethodReadyCount() |
String |
getMonitorAttributeValues() |
protected EjbMonitoringStatsProvider |
getMonitoringStatsProvider(String appName,
String modName,
String ejbName) |
int |
getSteadyPoolSize() |
protected void |
initializeHome()
Called from the ContainerFactory during initialization.
|
protected boolean |
isIdentical(EJBObjectImpl ejbo,
javax.ejb.EJBObject other) |
void |
onReady()
Called when server instance is Ready
|
boolean |
passivateEJB(ComponentContext context) |
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) |
protected boolean |
resumeTransaction(EjbInvocation inv) |
boolean |
scanForEjbCreateMethod() |
protected boolean |
suspendTransaction(EjbInvocation inv) |
boolean |
userTransactionMethodsAllowed(ComponentInvocation inv)
EJB spec makes a distinction between access to the UserTransaction
object itself and access to its methods.
|
_constructEJBInstance, _createJCDIInjectionContext, _createJCDIInjectionContext, addInvocationInfo, addLocalRemoteInvocationInfo, addProxyInterfacesSetClass, adjustHomeTargetMethodInfo, adjustInvocationInfo, assertValidLocalObject, assertValidRemoteObject, authorize, authorizeLocalGetPrimaryKey, authorizeLocalMethod, authorizeRemoteGetPrimaryKey, authorizeRemoteMethod, callEJBTimeout, cancelTimers, checkExceptionClientTx, checkUnfinishedTx, checkUserTransactionLookup, cleanupInstance, containerStateToString, createCallFlowAgent, createEjbInstanceAndContext, createEjbInstanceForInterceptors, createEjbInvocation, createEjbInvocation, createEmptyContextAndInterceptors, createMonitoringRegistry, createRemoteReferenceWithId, delistExtendedEntityManagers, doAfterBegin, doEJBHomeRemove, doFlush, enlistExtendedEntityManagers, 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, getPre30LifecycleMethodNames, getProtocolManager, getSecurityManager, getTargetObject, getTimeoutMethod, getTxAttr, getTxAttr, getTxAttrForLifecycleCallback, getUserTransaction, getUseThreadPoolId, incrementCreatedTimedObject, incrementDeliveredTimedObject, incrementRemovedTimedObject, initialize, initializeProtocolManager, injectEjbInstance, instantiateEJBLocalBusinessObjectImpl, instantiateEJBLocalObjectImpl, instantiateEJBLocalObjectImpl, instantiateEJBObjectImpl, instantiateEJBObjectImpl, instantiateOptionalEJBLocalBusinessObjectImpl, instantiateRemoteBusinessObjectImpl, intercept, intercept, invokeBeanMethod, invokeFindByPrimaryKey, invokeTargetBeanMethod, isApplicationException, isCreateHomeFinder, isEjbTimeoutMethod, isHAEnabled, isJCDIEnabled, 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, registerTimerMonitorableComponent, releaseTargetObject, removeBeanUnchecked, removeBeanUnchecked, setDebugMonitorFlag, setEJBMetaData, setStartedState, setStoppedState, setUndeployedState, startApplication, toString, undeploy, useClientTx, validateEMForClientTx, validateTxAttr, webServicePostInvoke
protected StatelessSessionContainer(BaseContainer.ContainerType conType, EjbDescriptor desc, ClassLoader loader, SecurityManager sm) throws Exception
Exception
public String getMonitorAttributeValues()
protected boolean suspendTransaction(EjbInvocation inv) throws Exception
suspendTransaction
in class BaseContainer
Exception
protected boolean resumeTransaction(EjbInvocation inv) throws Exception
resumeTransaction
in class BaseContainer
Exception
public boolean scanForEjbCreateMethod()
scanForEjbCreateMethod
in class BaseContainer
protected EjbMonitoringStatsProvider getMonitoringStatsProvider(String appName, String modName, String ejbName)
getMonitoringStatsProvider
in class BaseContainer
protected void initializeHome() throws Exception
BaseContainer
initializeHome
in class BaseContainer
Exception
protected void createBeanPool()
protected void registerMonitorableComponents()
registerMonitorableComponents
in class BaseContainer
public void onReady()
BaseContainer
onReady
in interface Container
onReady
in class BaseContainer
public EJBObjectImpl createRemoteBusinessObjectImpl() throws javax.ejb.CreateException, RemoteException
javax.ejb.CreateException
RemoteException
public EJBObjectImpl createEJBObjectImpl() throws javax.ejb.CreateException, RemoteException
createEJBObjectImpl
in class BaseContainer
javax.ejb.CreateException
RemoteException
public EJBLocalObjectImpl createEJBLocalObjectImpl() throws javax.ejb.CreateException
createEJBLocalObjectImpl
in class BaseContainer
javax.ejb.CreateException
public EJBLocalObjectImpl createEJBLocalBusinessObjectImpl(boolean localBeanView) throws javax.ejb.CreateException
javax.ejb.CreateException
protected void removeBean(EJBLocalRemoteObject ejbo, Method removeMethod, boolean local) throws javax.ejb.RemoveException, javax.ejb.EJBException, RemoteException
removeBean
in class BaseContainer
javax.ejb.RemoveException
javax.ejb.EJBException
RemoteException
protected void forceDestroyBean(EJBContextImpl sc)
forceDestroyBean
in class BaseContainer
protected EJBObjectImpl getEJBObjectImpl(byte[] instanceKey)
getEJBObjectImpl
in class BaseContainer
protected EJBLocalObjectImpl getEJBLocalObjectImpl(Object key)
getEJBLocalObjectImpl
in class BaseContainer
protected ComponentContext _getContext(EjbInvocation inv)
_getContext
in class BaseContainer
protected SessionContextImpl _constructEJBContextImpl(Object instance)
BaseContainer
_constructEJBContextImpl
in class BaseContainer
EJBContextImpl
protected void doTimerInvocationInit(EjbInvocation inv, Object primaryKey) throws Exception
BaseContainer
doTimerInvocationInit
in class BaseContainer
Exception
public boolean userTransactionMethodsAllowed(ComponentInvocation inv)
BaseContainer
userTransactionMethodsAllowed
in interface Container
userTransactionMethodsAllowed
in class BaseContainer
public void releaseContext(EjbInvocation inv)
releaseContext
in class BaseContainer
protected boolean isIdentical(EJBObjectImpl ejbo, javax.ejb.EJBObject other) throws RemoteException
isIdentical
in class BaseContainer
RemoteException
protected void checkExists(EJBLocalRemoteObject ejbObj)
checkExists
in class BaseContainer
javax.ejb.NoSuchObjectLocalException
- if the object has been removed.protected void afterBegin(EJBContextImpl context)
afterBegin
in class BaseContainer
protected void beforeCompletion(EJBContextImpl context)
beforeCompletion
in class BaseContainer
protected void afterCompletion(EJBContextImpl ctx, int status)
afterCompletion
in class BaseContainer
public boolean passivateEJB(ComponentContext context)
passivateEJB
in class BaseContainer
@Deprecated public void activateEJB(Object ctx, Object instanceKey)
ctx
- instanceKey
- protected void doConcreteContainerShutdown(boolean appBeingUndeployed)
doConcreteContainerShutdown
in class BaseContainer
public long getMethodReadyCount()
public int getMaxPoolSize()
public int getSteadyPoolSize()
Copyright © 2021. All rights reserved.