XA-Datasources are just like normal datasources, except that they need a different driver-class-name
and they support distributed transaction across heterogeneous transactional systems.
Imagine the classical example of an online store: a user buys an item, the item is removed from the stock database and an amount of money is subtracted from the user's bank account, which is an external system. Both the operations must succeed in order to proceed with payment and shipment.
This was just an example to give you the idea; we will not go any further.
The prerequisite of this recipe is the Getting ready section of the Creating and removing a datasource recipe.