Configuring Local Transaction Management

Many listeners in iWay Service Manager can be configured to function as transaction managers. To enable this functionality, ensure that the Listener is Transaction Manager parameter is set to true when you configure the listener parameters. When transaction management is enabled, any services are run within a local transaction that is managed by the listener.

You can configure a process flow to serve as the transaction boundary. In this case, a rollback can be triggered by adding a Fail service object to the process flow. A message on the queue is considered to be acquired and does not roll back to the original source. An error message is then sent to the configured channel outlet.

To demonstrate local transaction management, perform the following steps:

  1. Create a channel using iWay Service Manager that contains a File listener as an inlet.
  2. Set the Listener is Transaction Manager parameter to true for the File listener.
  3. Create a process flow using iWay Designer that contains an object that will fail.

    Consider the following process flow as an example:

In this process flow, the MQEmit service object is configured to emit a message to a valid MQ queue. The Join Local Transaction? parameter is set to true for the MQEmit service object. The Fail service object is set to fail and starts the rollback.

As a result, the message that is placed on the MQ queue by the MQEmit service object is removed and the following error message is sent to the configured channel outlet:

<eda>
  <error timestamp="2010-12-06T13:58:14Z" code="6" stage="AGENT" source="Fail">
       XD[FAIL] cause: 0 subcause: 0 message: failure!
          <data type="xml">&lt;test/&gt;</data>
  </error>
</eda>

iWay Software