3.1.4.16 R_QMAbortTransaction (Opnum 18)

A client calls the R_QMAbortTransaction method to abort an internal transaction.

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

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

Return Values:  On success, this method MUST return MQ_OK (0x00000000) and MUST 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 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 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 Abort ([MS-MQDMPR] section 3.1.4.5) 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).