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:
Generate a Message Position Available (section 3.1.7.2.2) event with the following arguments:
iQueue := transOp.MessagePositionReference.QueueReference
iPosition := transOp.MessagePositionReference
Else [if transOp.OperationType is Enqueue]:
Remove the MessagePosition (section 3.1.1.11) ADM element instance referenced by transOp.MessagePositionReference from the MessagePositionList ADM attribute of the Queue (section 3.1.1.2) ADM element instance referenced by transOp.MessagePositionReference.QueueReference.
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.