IBM WebSphere Adapters Network Card User Manual


 
When the container starts, it calls the getXAResources() method on the adapter to
get all the associated XA resources. The adapter then instantiates the appropriate
XA resource and returns it back to the container.
The JCA container now calls the recover() method on the returned
XAResourceImpl to get all the pending transactions from the configured event
persistence using the getPendingTransanctions() method. Depending on the
transaction state, the container calls either the rollback() or the commit() method on
the XAResourceImpl to update the status of the event to NEWEVENT or
PROCESSED on event persistence.
After connecting to the EIS, the adapter starts the adapterListener. The EIS then
triggers the adapterListener for any new event(s) and the adapterListener in turn
calls the CallbackEventSender with the same flow explained in the basic delivery
and delivery with XA transaction sequence diagrams. The following sequence
diagram depicts the callback event processing for event recovery.
Outbound support
Outbound support enables application components to execute operations on an EIS
and retrieve the results. Input data passed by the application component is
processed by the adapter to make changes or call functions on the underlying EIS.
Issuing outbound requests to a WebSphere adapter is no different than interacting
with any other JCA adapter as described in the JCA specification. The basic idea is
as follows:
1. A CCI client (for example, an EJB or other business process) looks up a
connection factory for the adapter using a JNDI service provided by the
application server.
2. The CCI client requests a resource adapter connection from that factory.
3. The CCI client then uses that connection to pass data to, and receive data from,
the underlying EIS.
The parts of this process that vary among adapters involve the data structures
exchanged and the operation-specific parameters passed.
The data structure for all WebSphere resource adapters for outbound requests is a
WebSphere business object wrapped in a WBIRecord implementation.
The parameters of the operation for any JCA adapter are defined through an
adapter-specific InteractionSpec instance; this class can contain 0..n properties
that specify details about the operation to perform. For WebSphere resource
adapters, a default WBIInteractionSpec class has one property: FunctionName.
Invoking components set the operation to perform in the FunctionName property.
(This is different from the verb that is defined in the actual business object). You
are strongly encouraged to use this InteractionSpec class. For example:
WBIConnection conn;
WBIRecord input;
WBIRecord output;
...
Interaction ix=conn.createInteraction();
WBIInteractionSpec ixSpec=new WBIInteractionSpec();
ixSpec.setFunctionName(WBIInteractionSpec.CREATE);
output = ix.execute(ixSpec, input);
WebSphere Adapter development overview 97