Adapter Development Kit 6.5 | 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 this transaction without requiring adapter users to perform any transaction management, as follows.
1. Integration Server invokes the request as follows:
a. The adapter service obtains a connection from the connection pool, creates a transaction, and enlists the connection in the current transaction.
b. The 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 has 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 causes the service request to fail, and a ServiceException is returned to the adapter user.
*If the service request fails, the transaction manager rolls back the current transaction.
Note that the commit or rollback occurs after the service has completed, 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 has already completed).