title: Explicitly commit or rollback an MQ unit of work using Java APIs
body: <p>I'm working on a standalone Java application that GETs several messages from one MQ queue, processes the data contained within the messages and then PUTs a new message onto another MQ queue. One of the requirements is for the GET and PUT operations to be within the same unit of work and I am able to do this by specifying <code>MQGMO_SYNCPOINT</code> and <code>MQGMO_SYNCPOINT</code> get/put message options.</p>
  
  <p>What I don't understand how to do using the Java MQ API is perform the MQCMIT and MQBACK operations to explicitly commit or rollback the MQ unit of work.</p>
  
  <p>I've searched on the IBM MQ InfoCenter website and the JavaDoc but I can't find anything on the APIs used for committing and rolling back a unit of work.</p>
  
  <p>The version of WebSphere MQ I'm using is 7.5 and I'm connecting to the queue manager using binding mode.</p>
  
  <p>Would anyone be able to provide some example code showing how to explicitly commit or rollback the MQ unit of work using the Java MQ APIs or point me in the direction of the appropriate JavaDoc page please?</p>