Two-phase commitment control ensures that committable resources on multiple systems remain synchronized.
i5/OS™ supports two-phase commit in accordance with the SNA LU 6.2 architecture. For more detailed information about the internal protocols used by the system for two-phase commit, see the SNA Transaction Programmer's Reference for LU Type 6.2, GC30-3084-05. All supported releases of i5/OS support the Presumed Nothing protocols of SNA LU 6.2 and the Presumed Abort protocols of SNA LU 6.2.
Two-phase commit is also supported using TCP/IP as a Distributed Unit of Work (DUW) Distributed Relational Database Architecture™ (DRDA®) protocol. To use TCP/IP DUW connections, all of the systems (both the application requester and the application server) must be at V5R1M0 or newer. For more information about DRDA, see the Open Group Technical Standard, DRDA V2 Vol. 1: Distributed Relational Database Architecture at the Open Group Web site.
Under two-phase commit, the system performs the commit operation in two waves:
When remote resources are under commitment control, the initiator sends a commit request to all remote agents. The request is sent throughout the transaction program network. Each agent responds with the results of the commit operation.
If errors occur during the prepare wave, the initiator sends a rollback request to all agents. If errors occur during the committed wave, the system attempts to bring as many locations as possible to committed status. These attempts might result in a heuristic mixed state. See States of the transaction for two-phase commitment control for more information about the possible states.
Any errors are sent back to the initiator where they are signaled to the user. If a default journal was specified on the Start Commitment Control (STRCMTCTL) command, C LW entries are written. If errors occur, these entries are written, even if OMTJRNE(*LUWID) was specified. You can use these entries, along with the error messages and the status information for the commitment definition, to attempt to synchronize the committable resources manually.
When remote resources are under commitment control, the initiator sends a rollback request to all remote agents. The request is sent throughout the transaction program network. Each agent responds with the results of the rollback operation.