Author |
Message
|
MQRomeo |
Posted: Mon May 17, 2004 12:52 am Post subject: How the dspmqtrn and rsvmqtrn works ? |
|
|
Newbie
Joined: 17 May 2004 Posts: 2
|
Hi,
I have created a C program that uses MQBEGIN and puts 5 messages on the Queue. After the 5 MQPUTS , I use MQCMIT to commit the messages to the queue.
My idea is to see the functionality of dspmqtrn.
After the putting the 4th MQPUT message on the queue, I have given a sleep in the program. Pls. note that the 5th message and the MQCMIT have not been issued yet from the program.
When I tried to use dspmqtrn from another window. It says "There are no prepared transactions".
I think it should display the uncommited messages. Any light on how to use dspmqtrn and the meaning of "in-dount" transactions. Kindly extend this to rsvmqtrn also.
Thanks |
|
Back to top |
|
 |
mqonnet |
Posted: Mon May 17, 2004 3:05 am Post subject: |
|
|
 Grand Master
Joined: 18 Feb 2002 Posts: 1114 Location: Boston, Ma, Usa.
|
All of the following from the manuals.
"Use the dspmqtrn command to display details of in-doubt transactions. This includes transactions coordinated by WebSphere MQ and by an external transaction manager. "
"-e
Requests details of externally coordinated, in-doubt transactions. Such transactions are those for which WebSphere MQ has been asked to prepare to commit, but has not yet been informed of the transaction outcome."
"-i
Requests details of internally coordinated, in-doubt transactions. Such transactions are those for which each resource manager has been asked to prepare to commit, but WebSphere MQ has yet to inform the resource managers of the transaction outcome. "
A transaction goes into in-doubt state only after its been committed. Of course for some errorneous reason. Percieve it as the channel going into in-doubt state and you using resolve channel command.
Without you issuing the start of the channel, it cannot go into an in-doubt situation. Same is the case here as well.
Cheers
Kumar _________________ IBM Certified WebSphere MQ V5.3 Developer
IBM Certified WebSphere MQ V5.3 Solution Designer
IBM Certified WebSphere MQ V5.3 System Administrator |
|
Back to top |
|
 |
markt |
Posted: Mon May 17, 2004 5:58 am Post subject: |
|
|
 Knight
Joined: 14 May 2002 Posts: 508
|
>> A transaction goes into in-doubt state only after its been committed.
Totally wrong.
A transaction is in-doubt after prepare, but before commit. In two-phase transactions. There is no in-doubt in one-phase (local) transactions. |
|
Back to top |
|
 |
mqonnet |
Posted: Mon May 17, 2004 6:02 am Post subject: |
|
|
 Grand Master
Joined: 18 Feb 2002 Posts: 1114 Location: Boston, Ma, Usa.
|
Markt, is there a write up in the docs anywhere you can point me to that substantiates your comments. Because my understanding was until you commit and something went wrong with the commit, the transaction is still "active". How can "active" transactions be "in-doubt"????
Cheers
Kumar _________________ IBM Certified WebSphere MQ V5.3 Developer
IBM Certified WebSphere MQ V5.3 Solution Designer
IBM Certified WebSphere MQ V5.3 System Administrator |
|
Back to top |
|
 |
markt |
Posted: Mon May 17, 2004 6:04 am Post subject: |
|
|
 Knight
Joined: 14 May 2002 Posts: 508
|
Try reading any textbook in transaction processing - eg Grey & Reuter - where "in-doubt" is defined. |
|
Back to top |
|
 |
mqonnet |
Posted: Mon May 17, 2004 6:08 am Post subject: |
|
|
 Grand Master
Joined: 18 Feb 2002 Posts: 1114 Location: Boston, Ma, Usa.
|
Thanks, i will.
Cheers
Kumar _________________ IBM Certified WebSphere MQ V5.3 Developer
IBM Certified WebSphere MQ V5.3 Solution Designer
IBM Certified WebSphere MQ V5.3 System Administrator |
|
Back to top |
|
 |
MQRomeo |
Posted: Tue May 18, 2004 9:32 pm Post subject: |
|
|
Newbie
Joined: 17 May 2004 Posts: 2
|
Thanks Markt.
I understand from your reply and also from the document, I downloaded that: these commands can only be used in two phase transactions where an external transaction manager is involved. If we don't use two phase commit, we cannot use this commands. |
|
Back to top |
|
 |
|