O'Reilly logo

Sams Teach Yourself J2EE™ in 21 Days by Peter Roxburgh, Andy Longshaw, Debbie Law, Dan Haywood, Martin Bond

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

Specifying a Stateful Session Bean

Specifying a stateful Session bean is similar to specifying a stateless Session bean. The remote interface defines access to the bean by remote clients, and every method of the remote interface must throw an RemoteException. The primary difference (from a specification viewpoint) is that there can be multiple create() methods in the home interface.

You will recall that a stateless Session bean allows only for a single create() method in the home interface, and this corresponds to the ejbCreate() method of the bean itself. For a stateful Session bean, the create() method can be overloaded, so that the stateful bean can be given some initial state. From the client's viewpoint, this is somewhat analogous to invoking ...

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