Adapter Development Kit 9.12 | webMethods Adapter Development Kit Documentation | webMethods Adapter Development Kit Installation and User’s Documentation | Integration Server Transaction Support | Simple Transactions
 
Simple Transactions
The simplest Integration Server transaction scenario is a Flow Service (or a Java Service) that invokes one adapter service that interacts with one resource. For example, the transaction might perform a database insert.
Integration Server executes the transaction without requiring adapter users to perform any transaction management, as follows:
1. Integration Server invokes the request as follows:
a. Adapter service obtains a connection from the connection pool.
b. Adapter service creates a transaction.
c. Adapter service enlists the connection in the current transaction.
d. Adapter service performs the database insert. If the insert fails, a ServiceException is thrown.
2. Integration Server informs the transaction manager that the service request is completed as follows:
*If the service request succeeds, the transaction manager commits the current transaction. If the commit fails, the transaction manager throws an exception that results in the failure of the service request, and a ServiceException is returned to the adapter user.
*If the service request fails, the transaction manager rolls back the current transaction.
Note:
The commit or rollback occurs after the service is complete, but before any response is sent to the client that invoked the service. This is because if the transaction commit fails, the service itself must fail. So, the transaction notification essentially becomes the last step of the service as opposed to occurring after the service is already complete.