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 API Support » XMS C# - Queue Open versus Queue Create

Post new topic  Reply to topic
 XMS C# - Queue Open versus Queue Create « View previous topic :: View next topic » 
Author Message
kayoumt
PostPosted: Sun Jun 14, 2009 8:47 am    Post subject: XMS C# - Queue Open versus Queue Create Reply with quote

Voyager

Joined: 18 Sep 2007
Posts: 81

Hi,

In some situations, I need to make two applications to concurrently read or write on an already existing (created) queue.

In C++, it seems that just creating a Destination object does the job.

Destination my_shared_queue = Destination(XMS_DESTINATION_TYPE_QUEUE,"MY.SHARED.QUEUE");



In C# ; it seems it is not possible to do it that way ; because I cannot call an IDestination object's constructor. To create that IDestination "object", I need to call a method from IConnection, ISeesion or IConnectionFactory.

Anyway ; calling ISession.CreateQueue for that future does not return a handle on an existing queue ; but, tries to physically create the queue and raises an exception when the queue already exists.

IDestination my_shared_queue = my_session.CreateQueue("MY.SHARED.QUEUE");



Thanks in advance for any help.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sun Jun 14, 2009 6:34 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Raise a PMR. Session.CreateQueue should never try to physically create a queue. However check the Reason code first. Maybe there is a reason that you get an exception like queue open in exclusive mode...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
kayoumt
PostPosted: Sun Jun 14, 2009 6:45 pm    Post subject: Reply with quote

Voyager

Joined: 18 Sep 2007
Posts: 81

Thanks for your answer.

I solved that issue. The listeners of my queue manager was stopped ; that's why I was getting that exception. Now ; CreateQueue returns an open queue handle even queue is shared by several applications.

Solved !
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 API Support » XMS C# - Queue Open versus Queue Create
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.