webMethods Adapter Runtime 10.7 | webMethods Adapter Runtime Documentation | webMethods Adapter Runtime User’s Documentation | Transaction Management | Implicit Transactions | Implicit Transaction Usage Cases | One Local Transaction
 
One Local Transaction
In this example, a flow with two adapter services interacts with the same local transaction resource. The flow performs two inserts into two tables of a database:
BEGIN FLOW
INVOKE insertDatabase1TableA // Local Transaction Resource1
INVOKE insertDatabase1TableB // Local Transaction Resource1
END FLOW
Integration Server starts the transaction when insertDatabase1TableA is invoked. It opens a connection to the resource, enlists it in the transaction, and performs the insert into TableA. When insertDatabase1TableB is invoked, Integration Server reuses the same connection to insert data into TableB. When the request is complete, Integration Server closes the connection and commits the transaction.
The following flow is illegal because it tries to interact with two local transaction resources as follows:
BEGIN FLOW
INVOKE insertDatabase1TableA // Service for Resource1
INVOKE insertDatabase2TableA // Service for Resource2
END FLOW