3.1.4.5 Transaction Abort

This event MUST be generated with the following argument:

iTransactionIdentifier: The transaction identifier for the transaction that is aborted.

Return Value:

  • rStatus: A status code that can be one of the following:

    • MQ_OK (0x00000000)

    • MQ_ERROR_TRANSACTION_SEQUENCE (0xC00E0051)

The queue manager MUST perform the following actions to process this event:

  • Retrieve the Transaction (section 3.1.1.14) ADM element instance, referred to as transObj, from LocalQueueManager.TransactionCollection for which the transObj.Identifier value matches the iTransactionIdentifier argument.

  • If a Transaction ADM element instance is not found, set rStatus to MQ_ERROR_TRANSACTION_SEQUENCE, and take no further action.

  • For each TransactionalOperation (section 3.1.1.13) ADM element instance, referred to as transOp, in transObj.TransactionalOperationCollection:

    • If transOp.OperationType is Dequeue or Move:

      • If transOp.MessagePositionReference.State is PurgePending:

        • Generate a Message Position Deleted (section 3.1.7.2.1) event with the following arguments:

          • iQueue := transOp.MessagePositionReference.QueueReference

          • iPosition := transOp.MessagePositionReference

          • iReason := transOp.DequeueReason

      • Else:

    • Else [if transOp.OperationType is Enqueue]:

    • Remove the TransactionalOperation (section 3.1.1.13) ADM element instance transOp from transObj.TransactionalOperationCollection.

  • Remove the Transaction ADM element instance transObj from LocalQueueManager.TransactionCollection.

  • Set rStatus to MQ_OK.