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 » Thread Pooling MQ Connections

Post new topic  Reply to topic
 Thread Pooling MQ Connections « View previous topic :: View next topic » 
Author Message
bob8799
PostPosted: Wed Dec 10, 2008 8:34 am    Post subject: Thread Pooling MQ Connections Reply with quote

Novice

Joined: 10 Dec 2008
Posts: 13

In the .NET MQ manual the statement:

'If you require simultaneous access to the same queue manager from multiple threads within your program, create a new MQQueueManager object for each thread that requires concurrent access. (This is equivalent to issuing a separate MQCONN call for each thread.)'

Is this really saying that even if you create a connection pool, you are still creating a separate connection for each thread?
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Dec 10, 2008 8:49 am    Post subject: Re: Thread Pooling MQ Connections Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

bob8799 wrote:
Is this really saying that even if you create a connection pool, you are still creating a separate connection for each thread?


Yes. WMQ connections are not thread safe and can't be shared.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Dec 10, 2008 9:16 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

WMQ connections can be shared between threads as of a middling CSD of v5.3, or potentially v5.2. This does not necessarily mean they should be, or that a connection sitting in MQGET with WAIT will be usable by anyone else.

Getting a connection from a connection pool will provide you a connection out of the pool, that is yours until you return it.

If the pool has no free connections, it will create a new one if the pool size allows.

The behavior of the MQQueueManager constructor under .NET with a connection pool is left as an exercise for the reader.
Back to top
View user's profile Send private message
bob8799
PostPosted: Wed Dec 10, 2008 9:51 am    Post subject: Re: Thread Pooling MQ Connections Reply with quote

Novice

Joined: 10 Dec 2008
Posts: 13

I am using MQ 6.0. Not sure if that makes a difference.
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 » Thread Pooling MQ Connections
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.