Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

This sample demonstrates the Transaction Mediator using a sample distributed transaction. In this sample, a record is delete from one database and added to a second database. If either of the operations (deleting from the first database and adding to the other) fails, all operations will roll back, and the records will be untouched.

Also, see Transaction Mediator.

Prerequisites

For a list of prerequisites, refer to see the Prerequisites section in ESB samples setup pageSamples Setup.

Building the sample

1. First, let's take a look at the synapse configuration used for this sample.

...

3. Start the ESB server and log into its management console UI (https: //localhost:9443/carbon ). In the management console, navigate to Main Menu, click Service Bus and then Source View. Next, copy and paste the above synapse configuration, which helps you explore the example scenario, to the source view  

4. Deploy the back-end service SimpleStockQuoteService, and start the Axis2 server using the instructions given in section Starting Sample Back-End Services.

Info
titleInfor

WSO2 ESB comes with a default JTA transaction manager (Atomikos), which allows you to run distributed transactions without deploying the ESB on an external application server.

...

We run this setup using the sample Stock Quote Client, which can operate in several modes. For information on this sample client, refer to section Stock Quote Client.

Execute the following ant command to invoke the sample client.

...