Adapter Development Kit 9.12 | webMethods Adapter Development Kit Documentation | webMethods Adapter Development Kit Installation and User’s Documentation | Integration Server Transaction Support | More Complex Transactions
 
More Complex Transactions
Suppose that a Flow Service or a Java Service invokes multiple adapter services. These adapter services might interact with a single resource (such as two services that perform two inserts into a single database) or with multiple resources (such as services that synchronize a database and an ERP system).
You can have one or more connections to a single resource. If multiple connections are used, then Integration Server enlists each connection in the transaction.
When the service request is complete, Integration Server notifies the transaction manager, which closes all enlisted connections and transactions.
*If the service request is successful, then Integration Server commits all transactions automatically using a two-phase commit if multiple resources are used.
*If the service request returns an error, then Integration Server rolls back the transaction and returns an error; that causes the service to return an error.
As mentioned previously, there are cases where adapter users must explicitly control the transactional units of work. For more information, see Explicit Transaction Usage Cases.
Note:
If a transaction accesses multiple resources, and more than one of the resources supports local transactions only, then the integrity of the transaction cannot be guaranteed. For example, if the first resource successfully commits, and the second resource fails to commit, the first resource interaction cannot be rolled back; it has already been committed. Integration Server detects this case when connecting to more than one resource that do not support two-phase commits and throws a runtime exception which results in the failure of the service execution.