16 IMS Connectivity in an On Demand Environment: A Practical Guide to IMS Connectivity
Figure 2-7 Send-then-commit message flow with sync level=sync point
In the resource coordination, two-phase commit (2PC) protocol is used. The two-phase
commit protocol is a process involving the participants, the sync point manager, and the
resource managers to ensure that, for updates made to a set of resources by the third-party
application program, either all occur or none occurs. In simple terms, the application program
decides to commit its changes to some resources. This commit is made to the sync point
manager who then polls all of the resource managers as to the feasibility of the commit call.
This is the preparation phase, often called phase 1. Each resource manager votes
yes or no,
and when the sync point manager has gathered all the votes, phase 2 begins. If all votes are
to commit the changes, the phase 2 action is commit. Otherwise, phase 2 becomes a
backout. System failures, communication failures, resource manager failures, or application
failures are not barriers to the completion of the two-phase commit process.
The work done by various resource managers is called a unit of recovery (UOR) and spans
from one consistent point of the work to another consistent point, usually from one commit
point to another. It is the unit of recovery that is the object of the two-phase commit process.
The OTMA environment requires some additional code, because OTMA is not a resource
manager. The additional code needed is an OTMA client, which supplied by IBM or an
equivalent. The client indicates to IMS (in the OTMA message prefix) that this message is
part of a protected conversation; therefore, IMS and the client are participants in the
coordinated commit process as managed by RRS.
2.3.3 IMS commit mode 1 message processing
OTMA processing of commit mode 1 (send-then-commit) input messages can be confusing,
especially if program-to-program message switches are involved. Commit mode 1 (CM1)
input messages can produce commit mode 0 (CM0) IOPCB output messages, which can
require special processing by the OTMA client. CM1 input messages can also produce the
message DFS2082 RESPONSE MODE TRANSACTION TERMINATED WITHOUT REPLY
IMSOTMA Client Application
GU Call
...
ISRT to IOPCB
Sync Start
Sync End
Transaction
completes
Transaction
inserted to SMB
OTMA Prefix
DATA
DATA
TRAN
OTMA Prefix
TRAN DATA
MSGQ
DATA
Output sent -
Request ACK
Send
Receive
Receive
OTMA Prefix
Commit Confirmed
OTMA Prefix
ACK
Send
Commit confirmed
Transaction
committed if RRS
commit received