Global transaction support with two-phase commit

To protect and maintain the integrity of your business resources, the IMS™ TM resource adapter supports global transaction management and two-phase commit processing.

Using this support, you can build a Java™ EE application to group a set of changes into one transaction, or a single unit-of-work, so that all changes within a transaction are either fully completed or fully rolled back. This support means that your application can run in a Java EE-compliant application server (for example, WebSphere® Application Server) to access IMS transactions and data in a coordinated manner. Global transaction management ensures the integrity of the data in IMS.

Example of global transaction support

When you make changes to your protected resources, you want to guarantee that the changes are made correctly. For example, as a bank customer you want to transfer money from your savings account to your checking account. You want to be sure that when the money is deducted from your savings account it is added to your checking account simultaneously. You would not want this transaction to be completed only partially, with the money deducted from your savings account but not added to your checking account.

In another example, you need to buy a ticket from San Francisco to Paris but a direct flight is not available. Unless you can successfully reserve a ticket from San Francisco to Chicago and another ticket from Chicago to Paris, you will not commit to your trip to Paris. That is, you will roll back your decision to go to Paris because having a confirmed seat for only one part of your trip is not useful to you.

In both of these examples, several smaller transactions are required to complete one overall transaction. If a problem occurs with one of these smaller transactions, you would not want to commit the overall transaction (such as transferring money or going to Paris). Instead, you would want to roll back every step of the transaction so that none of the smaller transactions are committed. To transfer your money or to go on your trip to Paris successfully, you want the smaller transactions to be managed and coordinated together to complete the overall transaction.

To ensure a coordinated transaction process, the Java EE platform (which consists of a Java EE application server, Java EE application components, and a Java EE connector architecture resource adapter) provides a distributed transaction processing environment where transactions are managed transparently and resources are updated and recovered across multiple platforms in a coordinated manner.