|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.ejb.containers.BaseContainer
com.sun.ejb.containers.StatelessSessionContainer
public class StatelessSessionContainer
This class provides container functionality specific to stateless SessionBeans. At deployment time, one instance of the StatelessSessionContainer is created for each stateless SessionBean type (i.e. deployment descriptor) in a JAR.
The 3 states of a Stateless EJB (an EJB can be in only 1 state at a time): 1. POOLED : ready for invocations, no transaction in progress 2. INVOKING : processing an invocation 3. DESTROYED : does not exist
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. Its assumed that the Resource Manager can handle multiple incomplete transactions on the same connection.
| Nested Class Summary | |
|---|---|
protected class |
StatelessSessionContainer.SessionContextFactory
|
| Nested classes/interfaces inherited from class com.sun.ejb.containers.BaseContainer |
|---|
BaseContainer.ContainerType |
| Field Summary | |
|---|---|
protected AbstractPool |
pool
|
| 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 |
StatelessSessionContainer(BaseContainer.ContainerType conType,
EjbDescriptor desc,
java.lang.ClassLoader loader)
|
| Method Summary | |
|---|---|
protected EJBContextImpl |
_constructEJBContextImpl(java.lang.Object instance)
|
protected ComponentContext |
_getContext(EjbInvocation inv)
Called from preInvoke which is called from the EJBObject for local and remote invocations. |
void |
activateEJB(java.lang.Object ctx,
java.lang.Object instanceKey)
|
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)
TODO ??? public void appendStats(StringBuffer sbuf) { sbuf.append("\nStatelessContainer: ") .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. |
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. |
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 java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected AbstractPool pool
| Constructor Detail |
|---|
protected StatelessSessionContainer(BaseContainer.ContainerType conType,
EjbDescriptor desc,
java.lang.ClassLoader loader)
throws java.lang.Exception
java.lang.Exception| Method Detail |
|---|
public java.lang.String getMonitorAttributeValues()
protected EjbMonitoringStatsProvider getMonitoringStatsProvider(java.lang.String appName,
java.lang.String modName,
java.lang.String ejbName)
getMonitoringStatsProvider in class BaseContainer
protected void initializeHome()
throws java.lang.Exception
BaseContainer
java.lang.Exceptionprotected void createBeanPool()
protected void registerMonitorableComponents()
registerMonitorableComponents in class BaseContainerpublic void onReady()
BaseContainer
onReady in interface ContaineronReady in class BaseContainer
public EJBObjectImpl createRemoteBusinessObjectImpl()
throws CreateException,
java.rmi.RemoteException
CreateException
java.rmi.RemoteException
public EJBObjectImpl createEJBObjectImpl()
throws CreateException,
java.rmi.RemoteException
CreateException
java.rmi.RemoteException
public EJBLocalObjectImpl createEJBLocalObjectImpl()
throws CreateException
CreateException
public EJBLocalObjectImpl createEJBLocalBusinessObjectImpl(boolean localBeanView)
throws CreateException
CreateExceptionprotected ComponentContext _getContext(EjbInvocation inv)
_getContext in class BaseContainerprotected EJBContextImpl _constructEJBContextImpl(java.lang.Object instance)
_constructEJBContextImpl in class BaseContainerpublic boolean userTransactionMethodsAllowed(ComponentInvocation inv)
BaseContainer
userTransactionMethodsAllowed in interface ContaineruserTransactionMethodsAllowed in class BaseContainerpublic void releaseContext(EjbInvocation inv)
releaseContext in class BaseContainerpublic boolean passivateEJB(ComponentContext context)
public void activateEJB(java.lang.Object ctx,
java.lang.Object instanceKey)
protected void doConcreteContainerShutdown(boolean appBeingUndeployed)
doConcreteContainerShutdown in class BaseContainerpublic long getMethodReadyCount()
public int getMaxPoolSize()
public int getSteadyPoolSize()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||