Performance benefits of the stateless model

Applications that use stateless components generally perform better. In the stateless model, each instance can serve different clients during the “think time” that is typically seen in interactive applications. In the stateful model, each client requires a dedicated component instance for the lifetime of the client session. Resources associated with the instance state remain tied up during the user’s idle time.

To develop stateless Enterprise JavaBeans component, follow the stateless session bean model described in the EJB specification.

For CORBA and PowerBuilder components, you can either configure stateless behavior, or code the component to call the appropriate lifecycle control method to unbind the component instance from the client reference in each business method. For more information, see Chapter 2, “CORBA Component Life Cycles and Transaction Semantics,” in the CORBA Components Guide.

Note the stateless model requires an implementation that supports stateless execution. For example, if your component requires two subsequent invocations to compute a result for the client, it will break if you change the component properties to enable stateless behavior.