|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Help with Clinet Channel table with Java/JMS |
« View previous topic :: View next topic » |
Author |
Message
|
Mallik |
Posted: Sun Feb 29, 2004 10:27 pm Post subject: Help with Clinet Channel table with Java/JMS |
|
|
Acolyte
Joined: 29 Feb 2004 Posts: 53
|
Hello,
I was just wondering how to use client channel table with Java and JMS.
I have 2 Queue Managers on different boxes. We have a requirment for an application to connect to the second Queue Manager, when the 1st one is down. The following are the steps that I did.
1. Created two Queue Managers QM1 & QM2 on different boxes.
2. Created client channel table with two entries pointing to two svrconn channels on two Queue Managers. (left the Queue manager name blank while creating client channels)
3. Set the AMQCHLLIB & AMQCHLTAB environment variables on a client box.
4. Tested with >amqsputc TESTQ by stopping one QM.
I noticed that messages are routing to the 2nd QM when one of them is down. I want to achieve the same thing using Java & JMS.
With my understanding using basic Java, we need to connect to the QM before we open a Queue for a put as follows.
MQQueueManager qManager= new MQQueueManager("QM");
or leave the QM name blank then the application connects to the default QM.
For my requirment I can't specify the QM as I want the application to connect automatically when one is down.
May be I am missing some thing here. Can some one please let me know how to acheive the same thing with java using the same client channel table.
Thanks
MQGuy |
|
Back to top |
|
 |
EddieA |
Posted: Sun Feb 29, 2004 11:59 pm Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
AFAIK you can't use the Client Table with Java/JMS. But would love to be corrected on this.
Instead of creating a client table with all the QMs, could you use a 'properties' file that lists them all. Then in your code you could try and connect to each one in turn.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
Mallik |
Posted: Mon Mar 01, 2004 11:30 am Post subject: Help with Clinet Channel table with Java/JMS |
|
|
Acolyte
Joined: 29 Feb 2004 Posts: 53
|
If I use a properties file, the way that I do is to try connecting to the 1st QM in the properties file and look for error code, if any try connecting to the 2nd QM. is that right?
I thought its a nice feature to use client channel table from an application to connect to a different QM when one is down. So whats the general usage for client channel tables?
Thanks |
|
Back to top |
|
 |
vennela |
Posted: Mon Mar 01, 2004 11:43 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
I think Client channel table is for the programming languages other than Java/JMS |
|
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
|
|
|
|