O'Reilly logo

J2EE™ Applications and BEA™ WebLogic Server™ by Sandra L. Emerson, Rob Woollen, Michael Girdley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Stateful Session EJBs

At first glance, stateful session beans seem very similar to stateless session beans. In theory, there are no required code changes to convert a stateless session bean to become stateful. Both EJB types must implement the javax.ejb.SessionBean interface and have the same basic requirements on the home and remote interface. However, in practice, stateful session beans look quite different from their stateless counterparts. Most of this differentiation is due to their stateful programming model.

The Stateful Programming Model

In the stateful session bean programming model, a client calls a create method on the home interface to create a new instance. Unlike stateless session beans, this causes the container to allocate a new ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required