properties should not change the configuration of the EIS.
javax.resource.cci.ConnectionMetadata:
A javax.resource.cci.ConnectionMetadata instance provides information to the client
components about the underlying EIS of a resource adapter. Client components can
use the javax.resource.cci.Connection.getMetadata() interface to retrieve
connection-specific EIS metadata.
The WBIConnection class implements a subclass
ManagedConnectionMetadataWrapper whose constructor takes a
ManagedConnectionMetadata instance and implements ConnectionMetadata.
WBIConnection also implements the getMetadata() interface to retrieve the
ManagedConnectionMetadata from the ManagedConnection instance and then
constructs ConnectionMetadata. Hence EIS-specific resource adapter
implementations can use this foundation class implementation without having to
implement their own ConnectionMetadata instance.
Implementing transaction support
A transaction is an isolated interaction with the EIS. Transaction support allows
users to ensure that multiple operations on the EIS are performed as atomic units
and are not impacted by other simultaneously occurring operations from other EIS
clients.
Note:
Transactions can be supported in an adapter only if the underlying EIS
supports transactions.
EIS application transactions typically rely on one of two commit protocols: the
one-phase or two-phase commit protocols. The one-phase commit protocol allows a
client to demarcate the beginning and end of transactional operations with a single
EIS application. The two-phase commit protocol, which is a superset of the
one-phase protocol, enables transactions to span multiple, heterogeneous EIS
systems. Accordingly, applications that support the one-phase commit protocol are
often said to support local transactions while those that support the two-phase
commit protocol are said to support global, or XA, transactions.
While an adapter can expose support for either or both protocols, the underlying
EIS must ultimately provide the support. By this token, you would not attempt to
implement XA support in your adapter if your underlying EIS application
inherently lacked transaction support.
Once you have determined that your EIS supports transactions, you must make
several modifications to your adapter to implement the support.
1.
Update Your Adapter Deployment Descriptor Property TransactionSupport, as
described in the JCA 1.5 specification, supports three values:
NoTransaction
,
LocalTransaction
, and
XATransaction
. You must specify the appropriate value
for the level of support you intend to provide. If your adapter supports XA,
specify
XATransaction
support but also implement the local transaction features
described below. (The JCA specification prescribes that any adapter supporting
XA should also support local transactions.)
2.
Update your adapter-specific construction of WBIResourceAdapterMetadata to
reflect support for local transactions.
ResourceAdapterMetadata#supportsLocalTransactionDemarcation should return
true
.
104
WebSphere Adapters: WebSphere Adapter Toolkit User Guide
Summary of Contents for WebSphere Adapters
Page 2: ......
Page 6: ...iv WebSphere Adapters WebSphere Adapter Toolkit User Guide...
Page 220: ...214 WebSphere Adapters WebSphere Adapter Toolkit User Guide...
Page 224: ...218 WebSphere Adapters WebSphere Adapter Toolkit User Guide...
Page 225: ......
Page 226: ...Printed in USA...