Chapter 10. Using transactions with Mule

 

In this chapter

  • Introducing transactional concepts
  • Using single resource transactions
  • Using XA transactions with multiple resources

A transaction, whether occurring in software or in real life, is a series of events that need to occur in a specified sequence, leaving all participants in some predetermined state. Leaving the software world aside for a moment, let’s consider a real-world example: paying for groceries in a supermarket. In such a transaction, the following steps need to occur in the specified order:

1.  

You place your groceries on the counter.

2.  

The cashier scans each item, adding the price of the item to the register.

3.  

The cashier sums the prices of the items and communicates the total for you.

4.  

You present the cashier with a credit card to pay for the groceries.

5.  

The cashier charges your credit card with the amount for the groceries.

6.  

The cashier returns the credit card to you.

7.  

The cashier bags your groceries.

8.  

You take the bag of groceries and leave the supermarket.

10.1. Using transactions with a single resource

10.2. Using multiple resource transactions

10.3. Managing transactions with exception strategies

10.4. Summary

sitemap