Author |
Message
|
Manikandan |
Posted: Wed Oct 20, 2004 9:17 pm Post subject: MQSERVER |
|
|
Voyager
Joined: 07 Jul 2004 Posts: 78
|
I am using two Queue Managers.
I want to connect to one QM and if that fails I should connect to the other Qmanager.
I am trying to use the MQSERVER variable and want to perform this as a client.
can someone post sample code,or there are better options than these?  |
|
Back to top |
|
 |
siliconfish |
Posted: Wed Oct 20, 2004 9:33 pm Post subject: |
|
|
 Master
Joined: 12 Aug 2002 Posts: 203 Location: USA
|
First of all if you use MQSERVER environment variable u can connect to only one queue manager.
Use MQCONNX and use the MQCNO structure to dynamically manipulate the connections. _________________ siliconfish |
|
Back to top |
|
 |
EddieA |
Posted: Thu Oct 21, 2004 8:52 am Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Or use a Client Channel table.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Oct 21, 2004 9:45 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I'm confused.
I didn't think you could use MQServer, an MQCONNX or a Client channel with a Java program.
So why would any of these suggestions be applicable in the first place? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
siliconfish |
Posted: Thu Oct 21, 2004 10:01 am Post subject: |
|
|
 Master
Joined: 12 Aug 2002 Posts: 203 Location: USA
|
Ok, looks like I overlooked that this is post in the java forum and the client is a java client.  _________________ siliconfish |
|
Back to top |
|
 |
EddieA |
Posted: Thu Oct 21, 2004 10:48 am Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Duhhh.
I saw that he was using MQSERVER, and assumed it was a "regular" client.
To answer the original question. For Java, you will have to handle the switch in your code. Try and connect to the 1st QM. If that fails, then try and connect to the 2nd.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
Manikandan |
Posted: Sun Oct 24, 2004 10:07 pm Post subject: |
|
|
Voyager
Joined: 07 Jul 2004 Posts: 78
|
I am running each QM on each machine solaris.
I am then initiating the MQ object using java.
I should use a client sort of a thing to connect to the QM which resides on another machine.
How could I handle the switching in the java code.
Please revert. |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Oct 25, 2004 4:49 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Manikandan wrote: |
How could I handle the switching in the java code.
Please revert. |
You need to write code that determines if one connection doesn't work then try the other one. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|