The Enterprise JavaBeans specification describes how
a session bean supports not only the methods defined on its remote interface
but some additional methods:
- There are methods defined on the EJBHome interface, they are callable
by a client wishing to:
- obtain a “storable” reference to the home (a home handle), or
- obtain the EJBMetaData for the bean type.
.
- There are methods defined on the EJBObject interface, they are are callable
by a client wishing to:
- obtain the home for the EJB, or
- obtain a “storable” reference to the object itself (a handle).
The purpose of handles is that they are serializable, once a handle is
obtained for a bean instance it can be serialized, perhaps to a flat file.
If, sometime later, a program wishes make calls against that same instance,
it can deserialize the handle and start calling methods again. The implementations
of the handles and the meta data class are product specific.
In CICS®, the implementations of the three interfaces HomeHandle, Handle
and EJBMetaData are:
- com.ibm.cics.portable.CICSSessionHomeHandle,
- com.ibm.cics.portable.CICSSessionHandle, and
- com.ibm.cics.portable.CICSEJBMetaData.
These implementations are included in the
CICSEJBClient.jar JAR
file, which can be downloaded from the
utils subdirectory in the
HFS area where CICS is installed. This jar should be included in the CLASSPATH
of any client program calling the special methods described above, to ensure
it understands the types of object returned from the server.
If, for example,
its CLASSPATH does not include CICSEJBClient.jar, a client program
that calls the getEJBMetaData function of an enterprise
bean may be returned either of the following:
- An exception
- Null
The precise value returned depends on the implentation of the client's
object request broker (ORB).