3.1.4.15 R_QMCommitTransaction (Opnum 17)

A client calls the R_QMCommitTransaction method to commit an internal transaction.

 HRESULT R_QMCommitTransaction(
   [in, out] RPC_INT_XACT_HANDLE* phIntXact
 );

phIntXact:  MUST be an RPC_INT_XACT_HANDLE (section 2.2.1.1.1) identifying the internal transaction to commit. MUST NOT be NULL. The value of this handle MUST have been acquired from R_QMEnlistInternalTransaction (section 3.1.4.14). On return, the server MUST set this parameter to NULL.

Return Values:  On success, this method MUST return MQ_OK (0x00000000) and set phIntXact to NULL; otherwise, the server MUST return a failure HRESULT, and the client MUST treat all failure HRESULTs identically.

Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol, as specified in [MS-RPCE].

This method is invoked at the dynamically assigned endpoint returned by the R_QMGetRTQMServerPort (section 3.1.4.24) method when IP_HANDSHAKE (0x00000000) or IPX_HANDSHAKE (0x00000002) is the interface specified by the fIP parameter.

When processing this call, the server MUST:

  • Locate the TransactionHandle (section 3.1.1.10) ADM element instance in the server's iTransactionHandleTable (section 3.1.1.9) where the value of the Handle attribute of the TransactionHandle ADM element instance equals the phIntXact parameter.

  • If no such TransactionHandle ADM element instance exists, take no further action and return a failure HRESULT.

  • Declare iLocatedTransactionHandle and set it to a reference to the located TransactionHandle ADM element instance.

  • Generate a Transaction Commit ([MS-MQDMPR] section 3.1.4.4) event with the following argument value:

    • iTransactionIdentifier := iLocatedTransactionHandle.TransactionReference.Identifier

  • Remove the iLocatedTransactionHandle from the iTransactionHandleTable.

  • Set the phIntXact parameter to NULL.

  • Return MQ_OK (0x00000000).