Global (XA) transactions with the IMS Universal drivers
IMS support for global, two-phase commit transactions for the IMS Universal drivers uses z/OS® Resource Recovery Services (RRS) multisystem cascaded transactions to coordinate database access requests between IMS Connect, the CSL Open Database Manager (ODBM), and IMS within an IMSplex.
The IMS Universal drivers provide the LocalTransaction and XAResources interfaces for communication with IMS Connect. IMS Connect maintains the XID and associates it with the work context token and the parent unit of recovery (UR), which represents the transaction as submitted by the IMS Universal drivers.
When IMS Connect receives a database access request from any of the IMS Universal drivers that requires two-phase commit, IMS Connect calls RRS and becomes the coordinator of the multisystem cascaded transaction. IMS Connect creates a parent unit of recovery (UR) and passes a parent UR token with the database access request to the CSL Open Database Manager (ODBM).
ODBM becomes a subordinate to the multisystem cascaded transaction and uses the parent-UR token received from IMS Connect to create a cascaded child UR.
When the client application requests prepare for commit, the IMS Universal drivers send a prepare signal to IMS Connect. IMS Connect then issues a prepare request to RRS, and waits for ODBM to complete phase one of the two-phase commit process. If the IMS resource manager is prepared to commit, ODBM returns the prepare to commit confirmation to RRS and RRS sends the results to IMS Connect. IMS Connect then sends the result of the prepare command back through the IMS Universal drivers to the transaction manager. At this point, the UR maintained by IMS Connect and ODBM is in an indoubt state until a commit or rollback command is sent in from the external transaction manager.
If all the resource managers associated with the global transaction can commit, the transaction manager hardens the commit decision and drives the IMS Universal drivers to commit the change. The IMS Universal drivers send a commit signal to IMS Connect and IMS Connect tells RRS that the overall decision is to commit all resources. RRS tells IMS to commit the changes. After IMS commits the changes, RRS then returns to IMS Connect with the information that the local resources have been committed. IMS Connect tells RRS to delete its log records.
The following figure illustrates the first 17 steps of the flow of a distributed two-phase commit global transaction that is submitted to IMS Connect from the IMS Universal drivers. The transaction involves one IMS system. RRS needs to be active on each z/OS image; however, IMS Connect does not need to be on the same z/OS image as ODBM and IMS.
The following figure illustrates the remaining steps of the flow of the distributed two-phase commit global transaction shown in the preceding figure.