If a commit of a transaction involves more than one resource manager, each resource manager plays a role in the transaction. A resource manager is responsible for committing or rolling back changes made during the transaction.
The resource managers by resource type are:
The following figures shows the basic roles in a transaction. The structure shown in the figures is called a transaction program network. The structure can be in a single-level tree and a multilevel tree.
When an application on System A issues a commit request, the resource manager on System A becomes the initiator. For DRDA distributed unit of work over TCP/IP, the initiator is called the coordinator.
The resource managers for the other three systems (B, C, and D) become agents for this transaction. For DRDA distributed unit of work over TCP/IP, agents are sometimes called participants.
If the application is using APPC communications to perform the two-phase commit, the relationship between systems can change from one transaction to the next. The following figure shows the same systems when an application on System B issues the commit request. This configuration is a multi-level tree.
The roles in this figure do not apply to DRDA distributed unit of work over TCP/IP because multi-level transactions trees are not supported.
The transaction program network has another level because System B is not communicating directly with System C and System D. The resource manager in System A now has the roles of agent and cascaded initiator.
To improve performance of LU 6.2 two-phase transactions, the initiator might assign the role of last agent to one of the agents. The last agent does not participate in the prepare wave. In the committed wave, the last agent commits first. If the last agent does not commit successfully, the initiator instructs the other agents to roll back.
For DRDA distributed unit of work over TCP/IP, the coordinator might assign the role of resync server to a participant. The resync server is responsible to resynchronize the other participants in the event in which there is a communications failure with the coordinator, or the coordinator has a systems failure.