Class StatelessSessionContainer

java.lang.Object
com.sun.ejb.containers.BaseContainer
com.sun.ejb.containers.StatelessSessionContainer
All Implemented Interfaces:
Container, com.sun.enterprise.container.common.spi.JavaEEContainer, org.glassfish.enterprise.iiop.spi.EjbContainerFacade

public class StatelessSessionContainer extends BaseContainer
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.