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 » MQBROWSE & MQGET

Post new topic  Reply to topic
 MQBROWSE & MQGET « View previous topic :: View next topic » 
Author Message
krishs
PostPosted: Mon Feb 11, 2002 5:50 am    Post subject: Reply with quote

Newbie

Joined: 03 Feb 2002
Posts: 8
Location: Chennai

Can some body give solution for this?

In our Java Application,I am running two threads.
One for nornal MQGET and another to Browse Messages on the Queue. Both are accessing same Queue. When Browse Thread try to get a Message, the MQGET thread has already removed it from the Queue. How to overcome this application?

Is there a option in MQ to set options while browsing no MQGET and while MQGET no browing?

Thanx in Advance,
Krishnan
Back to top
View user's profile Send private message Send e-mail
bduncan
PostPosted: Wed Feb 13, 2002 4:40 pm    Post subject: Reply with quote

Padawan

Joined: 11 Apr 2001
Posts: 1554
Location: Silicon Valley

Krishnan,
Could you perhaps explain what you are trying to accomplish with this scheme? There is probably a better way to set up your MQSeries queues and/or code your applications to avoid this problem. However, if there is no alternate way to architect things, you could possible solve the problem by opening the queue for exclusive access. In other words, when either application issues the MQOPEN call to open the queue, you would pass MQOO_INPUT_EXCLUSIVE as an open option. This way, until the application closes the queue, no other application will be able to open the queue for MQGETs. Of course, this raises a new issue. Now only one of your programs can open the queue at a time. And this of course introduces race conditions, starvation, etc... depending on how your applications deal with the queue being already opened exclusively by another application. I think if you could explain your configuration in more detail, we could probably architect a better way to access the queue in question so that you don't have to deal with these issues.


_________________
Brandon Duncan
IBM Certified MQSeries Specialist
MQSeries.net forum moderator
Back to top
View user's profile Send private message Visit poster's website AIM Address
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » MQBROWSE & MQGET
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.