z/OS MVS Programming: Callable Services for High-Level Languages
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Two-phase commit protocol

z/OS MVS Programming: Callable Services for High-Level Languages
SA23-1377-02

The two-phase commit protocol is a set of actions used to make sure that an application program makes all changes to a collection of resources or makes no changes to the collection. The protocol makes sure of the all-or-nothing changes even if the system, RRS, or the resource manager fails.

The phases of the protocol are:
  • Phase 1: In the first phase, each resource manager must be prepared to either commit or backout the changes. They prepare for the commit and tell RRS either YES, the change can be made, or NO, the change cannot be made.

    First, RRS decides the results of the YES or NO responses from the resource managers. If the decision is YES to commit the changes, RRS hardens the decision, meaning that it stores the decision in an RRS log.

    Once a commit decision is hardened, the application changes are considered committed. If there is a failure after this point, the resource manager will make the changes during restart. Before this point, a failure causes the resource manager to back out the changes during restart.

  • Phase 2: In the second phase, the resource managers commit or back out the changes.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014