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 » Sharing MQQueueManager

Post new topic  Reply to topic
 Sharing MQQueueManager « View previous topic :: View next topic » 
Author Message
yaravind
PostPosted: Wed Mar 26, 2003 7:29 am    Post subject: Sharing MQQueueManager Reply with quote

Apprentice

Joined: 17 Jun 2002
Posts: 25

I want to open the same Q for both BROWSE and GET at the same time. Is this possibble?

MQQueueManager qm=new MQQueueManager(....);

//the queue is being opened in two diff modes using the same QM object

qm.open(myQueue, openForBROWSE);

//I am opening the same queue in GET mode before closing it
qm.open(myQueue, openForGET);


Thanks in advance.
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
jefflowrey
PostPosted: Wed Mar 26, 2003 7:49 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

What happens when you run the code you have listed?

The Application Programming Guide says the following:
Quote:
Removing a message you have browsed
You can remove from the queue a message you have already browsed provided you have opened the queue for removing messages as well as for browsing. (You must specify one of the MQOO_INPUT_* options, as well as the MQOO_BROWSE option, on your MQOPEN call.)

To remove the message, call MQGET again, but in the Options field of the MQGMO structure, specify MQGMO_MSG_UNDER_CURSOR. In this case, the MQGET call ignores the MsgId, CorrelId, and GroupId fields of the MQMD structure.

In the time between your browsing and removal steps, another program may have removed messages from the queue, including the message under your browse cursor. In this case, your MQGET call returns a reason code to say that the message is not available.
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 » Sharing MQQueueManager
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.