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

Stateless Session EJBs

In the previous sections, we developed, deployed, and used a very simple stateless session EJB. In the following sections, we cover session EJBs in-depth and explain how to take advantage of container services such as transactions and security.

Stateless session EJBs are generally considered the easiest to program. Their simplicity has a number of advantages for both the bean writer and the EJB server. As their name implies, stateless session beans follow a stateless programming model.

In a stateless programming model, the object cannot maintain any state on behalf of its caller.

For instance, imagine we are developing a bank account stateless EJB. We might develop a remote interface Account.java with these methods:

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