3.1.4.6 DTC Transaction Prepare
The queue manager is notified by this event when the DTC transaction is prepared. This occurs when the queue manager is acting as a Resource Manager ([MS-DTCO] section 3.5) and has enlisted in the DTC transaction.
This event MUST be generated with the following argument:
A TXUSER_ENLISTMENT_MTAG_PREPAREREQ message ([MS-DTCO] section 2.2.10.2.2.11), referred to as lTxMessage, sent by the DTC transaction manager when it receives notification that the transaction is to be prepared by the application.
Return Value:
None.
The queue manager MUST perform the following actions to process this event:
Generate a Transaction Prepare (section 3.1.4.3) event with the following arguments:
iTransactionIdentifier := Transaction Object.Identifier of the DTC-enlisted transaction corresponding to lTxMessage, from the Resource Manager.Durable Log ADM element, as specified in [MS-DTCO] section 3.5.1.
iSinglePhase := False.
If the returned rStatus is set to MQ_OK:
If TXUSER_ENLISTMENT_MTAG_PREPAREREQ.fSinglePhase is set to zero:
Send a TXUSER_ENLISTMENT_MTAG_PREPAREREQDONE user message ([MS-DTCO] section 2.2.10.2.2.12) to its local transaction manager.
Otherwise, generate a DTC Transaction Commit (section 3.1.4.7) event, with the lTxMessage argument set to lTxMessage.
Otherwise, if the returned rStatus is not set to MQ_OK:
Generate a DTC Transaction Abort (section 3.1.4.8) event, with the lTxMessage argument set to lTxMessage.