Server Access for J2EE provides additional information about an ICS
connection and about the WebSphere Access Resource Adapter itself. An
application component can access this information through the interfaces of
the CCI that provide metadata. In Table 15, the Supported Methods column lists those interface methods
that Server Access for J2EE implements.
Table 15. Server Access for J2EE CCI Implementation for Obtaining Metadata
CCI Interface | Description | Supported Methods |
---|---|---|
ConnectionMetaData , CwConnectionMetaData | Provides information about the connection to WebSphere Interchange
Server.
The getMetaData() method on a Connection instance returns a ConnectionMetaData instance. | All methods shown in Table 16. |
ResourceAdapterMetaData , CwResourceAdapterMetaData | Provides information about the WebSphere Access Resource Adapter.
The getMetaData() method on a ConnectionFactory instance returns a ResourceAdapterMetaData instance. | All methods shown in Table 17. |
An application component can perform the following tasks to obtain metadata:
The
ConnectionMetaData interface provides information about the connection
to the EIS. The implementation of the ConnectionMetaData
interface that Server Access for J2EE provides is called
CwConnectionMetaData, which allows an application component to obtain
information about a connection it has established to
InterChange Server through a Connection instance. Table 16 shows the methods that the ConnectionMetaData
interface provides for obtaining metadata for a connection. The
CwConnectionMetaData interface implements all methods in
Table 16.
Table 16. Methods in the ConnectionMetaData interface
To obtain connection metadata, the application component takes the following steps:
The ResourceAdapterMetaData interface provides information about the WebSphere Access Resource Adapter. The implementation of the ResourceAdapterMetaData interface that Server Access for J2EE provides is called CwResourceAdapterMetaData, which allows an application component to obtain information about the capabilities of the Access Resource Adapter. Table 17 shows the methods that the ResourceAdapterMetaData interface provides for obtaining metadata for the resource adapter. The CwResourceAdapterMetaData interface implements all methods in Table 17.
Table 17. Methods in the ResourceAdapterMetaData interface
To obtain metadata for the Access Resource Adapter, the application component takes the following steps:
For example, the following lines determine whether Server Access for J2EE supports the first form of the Interaction.execute() method (the form that supports both input and output records):
res_adpt_metadata = connFactory.getMetaData(); if (res_adpt_metadata.supportsExecuteWithInputandOutputRecord()) { // takes steps to initialize input record // call first form of execute() Interaction.execute(.....);