EJB.8.8 Entity Home Handles


The EJB specification allows the client to obtain a handle for the home interface. The client can use the home handle to store a reference to an entity bean's home interface in stable storage, and recreate the reference later. This handle functionality may be useful to a client that needs to use the home interface in the future, but does not know the JNDI API name of the home interface.

A handle to a home interface must implement the javax.ejb.HomeHandle interface.

The client code must use the javax.rmi.PortableRemoteObject.narrow(...) method to convert the result of the getEJBHome() method invoked on a handle to the home interface type.

The lifetime and scope of a handle are specific to the handle implementation. At the minimum, a program running in one JVM must be able to serialize the handle, and another program running in a different JVM must be able to deserialize it and recreate an object reference. An entity handle is typically implemented to be usable over a long period of time ”it must be usable at least across a server restart.



Java 2 Platform, Enterprise Edition. Platform and Component Specifications
Java 2 Platform, Enterprise Edition: Platform and Component Specifications
ISBN: 0201704560
EAN: 2147483647
Year: 2000
Pages: 399

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net