|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Thread Pooling MQ Connections |
« View previous topic :: View next topic » |
Author |
Message
|
bob8799 |
Posted: Wed Dec 10, 2008 8:34 am Post subject: Thread Pooling MQ Connections |
|
|
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 |
|
 |
Vitor |
Posted: Wed Dec 10, 2008 8:49 am Post subject: Re: Thread Pooling MQ Connections |
|
|
 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 |
|
 |
mqjeff |
Posted: Wed Dec 10, 2008 9:16 am Post subject: |
|
|
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 |
|
 |
bob8799 |
Posted: Wed Dec 10, 2008 9:51 am Post subject: Re: Thread Pooling MQ Connections |
|
|
Novice
Joined: 10 Dec 2008 Posts: 13
|
I am using MQ 6.0. Not sure if that makes a difference. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|