Show TOC

Background documentationTransaction Inflow Support Implementation Locate this document in the navigation structure

 

Transaction inflow implies the process of transactional invocation of application components from the Enterprise Information System (EIS) using an inbound resource adapter. To support the transaction inflow, the resource adapter should implement certain requirements that define its standard behavior in cases of incoming transactions, as well as the transaction completion.

Features

The transaction contexts in-flowed from the EIS are represented by the resource adapter in a uniform way using the javax.transaction.xa.Xid interface.

To pass the imported transaction to the application server, the resource adapter constructs a work instance and an ExecutionContext, which contains the transaction ID (Xid instance). Then it passes the work instance along with the ExecutionContext to the WorkManager on the application server, which processes the transaction in an application server thread. Thus, the resource adapter associates the work instance to the in-flowed transaction.

To complete the transaction, the resource adapter has to obtain an XATerminator instance from the application server using the BootstrapContext, received from the server at resource adapter startup. Then the adapter can prepare and commit the transaction using two-phase commit.

It is not possible to commit or roll back a transaction, if the work associated with it has not been completed. In this case, you can only invoke the forget operation on the transaction, which invokes forget on all the resources enlisted in the transaction.

To enable the enlistment of LocalTransaction instances into the in-flowed transaction, set the EnableLocalTransactionEnlistmentInOTS property of the Transaction Service to true.