Class StatelessSessionContainer

  • All Implemented Interfaces:
    Container, JavaEEContainer, 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 three states of a Stateless EJB (an EJB can be in only one 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. It is assumed that the Resource Manager can handle multiple incomplete transactions on the same connection.