6.6. Transaction management
The API calls used to control the transaction depend on the type of transaction that is being used. There are three different scenarios:
When the only resources are the MQSeries messages (local unit of work):
In this scenario, the transaction is started by the first message sent or received under syncpoint control, as specified using the MQPMO_SYNCPOINT or MQGMO_SYNCPOINT option of the MQPutMessageOptions or MQGetMessageOptions objects. Multiple messages can be included in the same unit of work. The transaction can be committed by using the Commit() method or backed out by using the Backout() method of the MQQueueManager object. Example 6-9 shows how to put a message under syncpoint control.
Example 6-9. Put message ...
Get MQSeries Programming Patterns now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.