In distributed java enterprise application, transaction is processed by Transaction Manager. Transaction manager is the primary component of distributed transaction infrastructure. The transaction manager is responsible for cordinating transaction among multiple resources of the application, and it also provides the additional low level services to process the transaction across the multiple resource manager. An application server uses the transaction manager to perform transaction across the multiple resource manager. The transaction manager is responsible for committing transaction or roll back transaction. It also manages the transaction across multiple resource manager and supports propagation of transaction across distributed system. It supports XA Transaction management contract with resource manager. The resource manager supports two type of transaction -
1. JTA/XA Transaction- The transaction manager that coordinates and controls to those transaction which is external to the resource manager, is referred as JTA or XA transaction.
2. RM or Local transaction- The transaction manager that coordinates and controls to those transaction which is internal to the resource manager, is referred as RM or Local Transaction.
Distributed Transaction in java EEIn the above diagram the client call the EJS A and this EJB A access the resources managed by EIA and also calls the EJB B to access EIB B. A Resource manager supports XA transaction management contract with resource manager. The XA transaction interface is used manage transaction across the resource manager. At first the application sends a transaction request to transaction manager. A transaction is a single logical unit, there can be many transaction branches on the transaction managet.
Posted on: October 26, 2010 If you enjoyed this post then why not add us on Google+? Add us to your Circles