1.3.1.2.3.1 XA Resource Manager Registration and Unregistration
The following sequence diagram is a schematic of the interactions that take place between the various software components involved in the usage scenario when a One-Pipe XA Resource Manager is registered with a Transaction Manager.

Figure 10: One-pipe XA Resource Manager registration and unregistration
The protocols involved are specified as follows:
The protocol between the XA Resource Manager Bridge and the XA Resource Manager Bridge Facet is specified by this document in section 2 and section 3.
The XA Protocol between the XA Resource Manager Bridge Facet and the XA Resource Manager is implemented by the XA Resource Manager and is implementation-specific. However, the API follows the [XOPEN-DTP] specification, with the exception that ax_reg and ax_unreg operations are not supported by the transaction manager and are not used by the extensions defined in this document.
The protocol between the application and the XA Resource Manager Bridge is implementation-specific.
To register an XA Resource Manager, an application passes the XA Resource Manager Bridge a DLL Name, a Data Source Name, and an RM cookie. The DLL name is used by the XA Resource Manager Bridge Facet to load the xa_switch of the XA Resource Manager. The Data Source Name, an ASCII string, is passed to the xa_open and xa_close calls made on this XA Resource Manager. The RM cookie is used by the application to identify the XA Resource Manager in future calls.
The XA Resource Manager Bridge passes these parameters to the XA Resource Manager Bridge Facet, which loads the xa_switch of the XA Resource Manager and calls xa_open and then xa_close on it. If this succeeds it will write the DLL Name, the Data Source Name, and a GUID generated to uniquely identify the XA Resource Manager to a durable log to allow for recovery in case of a transient failure. The XA Resource Manager Bridge Facet then passes the GUID back to the XA Resource Manager Bridge.
The XA Resource Manager Bridge uses the GUID to register an OleTx Resource Manager, then stores the GUID, indexed by the RM cookie, and returns success.
When all Work is complete for the XA Resource Manager, it is unregistered by passing the RM cookie to the XA Resource Manager Bridge along with a flag to indicate whether to initiate recovery on the XA Resource Manager.
If no recovery is necessary, an RMCLOSE request is sent on the same CMP connection (as specified in [MS-CMP]) used to register the XA Resource Manager to unregister XA Resource Manager.
The XA Resource Manager Bridge Facet removes the entry for the XA Resource Manager from the Durable log and returns success.
If recovery is necessary, the CMP connection (as specified in [MS-CMP]) used to register the XA Resource Manager is brought down, which will trigger recovery.