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 » General IBM MQ Support » Managing transactions over multiple queues

Post new topic  Reply to topic
 Managing transactions over multiple queues « View previous topic :: View next topic » 
Author Message
kenhallvm
PostPosted: Fri Jun 21, 2002 3:53 am    Post subject: Managing transactions over multiple queues Reply with quote

Newbie

Joined: 21 Jun 2002
Posts: 1

How does one go about managing messages in different queues as a single unit of work? I know I can use syncpoint on a number of messages in a single queue but is there a higher level of transaction management that I can use where the messages are in two (or more) different queues?

Thanks in advance
Ken
Back to top
View user's profile Send private message
mrlinux
PostPosted: Fri Jun 21, 2002 5:01 am    Post subject: Reply with quote

Grand Master

Joined: 14 Feb 2002
Posts: 1261
Location: Detroit,MI USA

use MQBEGIN/MQCMIT/MQBACK
_________________
Jeff

IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries
Back to top
View user's profile Send private message Send e-mail
StefanSievert
PostPosted: Fri Jun 21, 2002 12:16 pm    Post subject: Re: Managing transactions over multiple queues Reply with quote

Partisan

Joined: 28 Oct 2001
Posts: 333
Location: San Francisco

kenhallvm wrote:
How does one go about managing messages in different queues as a single unit of work? I know I can use syncpoint on a number of messages in a single queue but is there a higher level of transaction management that I can use where the messages are in two (or more) different queues?

Thanks in advance
Ken

Ken,
the scope of your UOW is the connection handle returned from MQCONN, not the object handle of the MQOPEN (that's why the connection handle is the argument to the CMIT/BACK calls ). If you only have MQ resources in your UOW, you don't need the MQBEGIN verb. Your unit of work starts with the first syncpointed PUT/GET and ends with MQCMIT or MQBACK.
So, you could have a logic like this:
Code:
MQCONN
MQOPEN q1
MQOPEN q2
MQGET q1 sync
MQPUT q2 sync
if no_error MQCMIT
else MQBACK
MQCLOSE q1
MQCLOSE q2

You could even MQCLOSE the queues before you commit or backout without affecting the unit of work. Again, it's tied to the connection handle, not to any of the object handles, so you can coordinate put/get operation across multiple queues.
Does this make sense? I hope so (my brain is not with me today, beacuse I got up at 3:30am to watch soccer... ).
Have a nice weekend,
Stefan
_________________
Stefan Sievert
IBM Certified * WebSphere MQ
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 » General IBM MQ Support » Managing transactions over multiple queues
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.