How it works: The two-phase commit process
The RMI supports the two-phase commit process. This topic gives you a brief summary of the two-phase commit process and other related processing as seen from the perspective of the RMI.
- When a unit of work is first created, Recovery manager creates a local_uow_id, which is used by the RMI.
- When the task syncpoints, a prepare-to-commit request is then issued to each task-related user exit used during the current UOW. For each task-related user exit, issuing the prepare request indicates the start of phase 1 of commit processing from the perspective of CICS®.
- If all syncpoint participants vote YES to the prepare requests, Recovery manager will commit the
UOW. CICS then invokes each task-related user exit with a
commit request. This indicates the start of phase 2 commit processing for the task-related user
exit.
If the task-related user exit cannot commit the UOW, Recovery manager will maintain a record of the status of the UOW status so that the task-related user exit can resync later.
- If one or more of the task-related user exits votes NO to the prepare-to-commit request, all the recoverable resources of the tasks are backed out.