Java Reference
In-Depth Information
span multiple resources. For example, in the ActionBazaar application, the OrderPro-
cessorBean must update the inventory records in ActionBazaar's database and also per-
sist the credit information in the billing database, as shown in figure 6.2 .
Figure 6.2. Distributed transaction management. The application program delegates transaction operations to the
transaction manager, which coordinates between resource managers.
From the application's perspective, the transaction manager is an external component that
provides simplified transaction services. The OrderProcessorBean asks the transac-
tion manager to start, commit, and roll back transactions. The transaction manager coordin-
ates these requests among the two resource managers. If the update to the billing database
fails, the transaction manager will ensure that changes made to the inventory in the Ac-
tionBazaar database are reverted. Coordination between two or more resources is accom-
plished via the use of the two-phase commit.
 
Search WWH ::




Custom Search