Obtaining session metadata

The EJBMetaData interface provides information about the enterprise bean. Table 12 shows the methods that the EJBMetaData interface provides for obtaining metadata for the session bean. A client component can use this metadata to dynamically invoke an enterprise bean.

Table 12. Methods in the EJBMetaData interface

EJBMetaData method Description


getEJBHome()
Obtains the home interface of the WebSphere Access EJB


getHomeInterfaceClass()
Obtains the class object for the home interface of the WebSphere Access EJB


getPrimaryKeyClass()
Because a WebSphere Access EJB is a session bean, this method is not implemented.


getRemoteInterfaceClass()
Obtains the class object for the remote interface of the WebSphere Access EJB


isSession()
Determines whether the current enterprise bean is a session bean. This method always returns true for a WebSphere Access EJB.


isStatelessSession()
Determines whether the current session bean is a stateless session bean. This method always returns true for a WebSphere Access EJB.

Important:
Support for the EJBMetaData interface is dependent on the EJB container. The containers for the application servers that are WebSphere business integration system-certified support this metadata interface.

To obtain EJB metadata, the client component takes the following steps:

  1. Use the EJBHome.getEJBMetaData() method to obtain an EJBMetaData object.
  2. Use the appropriate EJBMetaData method (see Table 12) to obtain the metadata from this object.

Copyright IBM Corp. 1997, 2004