IBM WebSphere Adapters Network Card User Manual


 
You can select the following properties when generating outbound adapter classes:
v Local transaction support
Generating outbound adapter classes with local transaction support means that
the transaction is managed and performed by the EIS. LocalTransaction indicates
the IBM WebSphere adapter supports local transactions. Local transaction
support methods provide a LocalTransaction implementation and return the
wrapper.
Using the WBILocalTransaction covers the following requirements:
Notifies the JCA container
Updates the state of transactions on the WBIManagedConnection
When you choose the Local Transaction Support component property from the
list of outbound adapter component properties, the wizard will create the
following method in the ManagedConnection class:
/**
* Does the EIS support local transaction? Provide a LocalTransaction
* implementation and return the wrapper.
*
* @return new instance of WBILocalResourceWrapper
* @see javax.resource.spi.ManagedConnection#getLocalTransaction()
*/
public LocalTransaction getLocalTransaction() throws ResourceException {
FooLocalTransaction transaction = new FooLocalTransaction(this);
return new WBILocalTransactionWrapper(transaction, this);
}
For information on how to generate an outbound adapter with local transaction
support, see Generating outbound local transaction support methods.
v XA transaction support
Generating outbound adapter classes with XA transaction support means the
transaction spans multiple heterogeneous systems. It uses global or
two-phase-commit protocol. If a transaction manager coordinates a transaction,
that transaction is considered a global transaction.
Using the WBILocalTransaction covers the following requirements:
Notifies the JCA container
Updates the state of transactions on the WBIManagedConnection
The getXAResource() method should get the XAResource from your EIS and
return the wrapper. The WBIXAResourceWrapper acts as a thin layer delegating
all calls to the underlying EIS XAResource instance, while at the same time
tracking the sequence of calls to monitor and determine when the connection is
involved in a transaction and when it is not.
The wizard will create the getXAResource() and getLocaltransaction() method
as follows:
Local method
/**
* Does the EIS support local transaction?
*
* @return new instance of WBIXAResourceWrapper
* @see javax.resource.spi.ManagedConnection#getLocalTransaction()
*/
public LocalTransaction getLocalTransaction() throws ResourceException {
FooLocalTransaction transaction = new FooLocalTransaction(this);
return new WBILocalTransactionWrapper(transaction, this);
}
XA method
36 WebSphere Adapters: WebSphere Adapter Toolkit User Guide