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

Handles

In some cases, an EJB client may wish to save its EJBObject reference to persistent storage for retrieval at a later date or more likely by another program. The EJB specification defined the concept of Handles as a serializable object that encapsulates sufficient information to reconstitute an EJBObject reference. Handles might be used to pass EJB references between two cooperating processes. The receiving process gets the EJBObject reference back again from the Handle. To get a Handle, the programmer calls the getHandle() method on the EJBObject interface. This returns the programmer an instance of javax.ejb.Handle. To re-create the EJBObject reference, the Handle interface contains a getEJBObject() method.

For instance:

 // convert ...

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