ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » Transactions in MQSeries

Post new topic  Reply to topic
 Transactions in MQSeries « View previous topic :: View next topic » 
Author Message
tomtran
PostPosted: Tue Oct 16, 2001 4:21 pm    Post subject: Reply with quote

Newbie

Joined: 15 Oct 2001
Posts: 4

I'm using Java MQSeries classes v5.2 and am a little confused about MQSeries transaction support.

Does anyone know how to use MQQueueManager.begin() for transactions? If you call this method, do you still need to set synchpoint options on gets and puts? Does anyone have a sample of the proper way to do a two-phase commit (do a get from 1 queue, and a put to another queue in 1 transaction)? Are Transactions only supported if you are in bindings mode? Is there any way to do transactions if the client is remote from the MQSeries server?

Thank you.
Back to top
View user's profile Send private message
EddieA
PostPosted: Wed Oct 17, 2001 5:38 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

Hi,

If you only want to co-ordinate MQ messages, then you don not need MQQueueManager.begin(). If fact, that might even throw an exception (under other APIs, it returns a warning). It is used for co-ordinating MQ messages with database operations.

All you need do is use the MQC.MQxMO_SYNCPOINT option in the relevent MQGetMessageOptions or MQPutMessageOptions on the 1st MQ operation.

Here's a snippet from the Application Programmers guide:

Queue-manager-coordinated local unit of work.

This is a unit of work in which the queue manager is the only resource manager participating, and so the queue manager acts as the unit-of-work coordinator.

To start this type of unit of work, the MQPMO_SYNCPOINT or MQGMO_SYNCPOINT option should be specified on the first MQPUT , MQPUT1 , or MQGET call in the unit of work.

It is not necessary for the application to issue the MQBEGIN call to start the unit of work, but if MQBEGIN is used, the call completes with MQCC_WARNING and reason code MQRC_NO_EXTERNAL_PARTICIPANTS.

To commit or back out this type of unit of work, the MQCMIT or MQBACK call must be used.

Cheers.

_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Transactions in MQSeries
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.