Author |
Message
|
cd |
Posted: Fri Apr 03, 2009 10:15 am Post subject: MQCONNX and RC=2002. |
|
|
 Novice
Joined: 16 May 2001 Posts: 20
|
Hi all,
I'm sure I'm just missing something obvious but my eyes just can't see it...
The environment is HP-UX on both PA-RISC and Itanium servers, AIX, and MQ v6.0.2.5 on all servers. I have an app developer who is trying to issue two separate MQCONNX calls in the same C program to connect to two different queue managers. The first call is successful. The second call returns Reason Code 2002 (MQRC_ALREADY_CONNECTED). They are using a separate MQCNO and MQCD for each call.
Any suggestions on what might be wrong?
Any suggestions on how to get this to work? How to code it correctly?
Thanks.
Curt |
|
Back to top |
|
 |
Vitor |
Posted: Fri Apr 03, 2009 10:30 am Post subject: Re: MQCONNX and RC=2002. |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
cd wrote: |
Any suggestions on what might be wrong?
Any suggestions on how to get this to work? How to code it correctly?
|
Are both connect calls being issued from the same thread? That won't work, as indicated here _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
cd |
Posted: Fri Apr 03, 2009 10:53 am Post subject: |
|
|
 Novice
Joined: 16 May 2001 Posts: 20
|
Yes, both calls are from the same thread. I had also read the entry for a 2002 in the Messages manual but was hoping that they just missed something in the MQCNO options in their code.
Any speculation as to why multiple connections to different queue managers is not allowed? I'm sure the app developer will ask...
Thanks!
Curt |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Apr 03, 2009 10:58 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
cd wrote: |
Yes, both calls are from the same thread. |
vitor wrote: |
That won't work, as indicated here |
cd wrote: |
Any speculation as to why multiple connections to different queue managers is not allowed? |
No speculation required. It is allowed. Just not from the same thread. |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Apr 03, 2009 10:58 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
cd wrote: |
Yes, both calls are from the same thread. I had also read the entry for a 2002 in the Messages manual but was hoping that they just missed something in the MQCNO options in their code.
Any speculation as to why multiple connections to different queue managers is not allowed? I'm sure the app developer will ask...
Thanks!
Curt |
Because it would be beneficial to have a qmgr to qmgr connection for trying to put stuff to a foreign qmgr... Less trouble with a number of communications problems.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
PeterPotkay |
Posted: Fri Apr 03, 2009 11:30 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
I've written Java and VB.net monitoring apps that connect concurrently to lots of QMs in a single thread in MQ Client mode.
You are probably not resettng your connections parameters properly and reconnecting to QM1 when you think you are going to QM2. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Apr 03, 2009 11:34 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Java is an entirely separate animal.
VB.NET may or may not be, either. |
|
Back to top |
|
 |
|