|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Client channel definition table in Java |
« View previous topic :: View next topic » |
Author |
Message
|
vasu |
Posted: Wed Jan 23, 2002 4:03 pm Post subject: |
|
|
Novice
Joined: 13 Nov 2001 Posts: 15
|
Hi MQ Gurus,
Can I use a client channel definition table for MQSeries Java Client API. My requirement is, I have two MQ Servers with same QMgr & Queue definitions. My application should connect to Server2 if server1 is not available. I heard, for C++ API, you can create a Channel definition table and set that in MQ Environment variables (MQCHLLIB, MQCHLTAB). Will this approach work for Java ? If not, can you please suggest the best way to do this ? Don't tell me I have to handle it myself in my application
Thanks,
Vasu.
|
|
Back to top |
|
 |
kolban |
Posted: Thu Jan 24, 2002 7:20 am Post subject: |
|
|
 Grand Master
Joined: 22 May 2001 Posts: 1072 Location: Fort Worth, TX, USA
|
You have to handle it in your application
But seriously, in Java, this is a trivial task. Create a proerties file and write a trivial Java class that contains a HashTable, reads the properties file and then SuperClass MQQueueManager to map the queue manager name supplied to the MQEnvironment settings found in the HashTable. |
|
Back to top |
|
 |
vasu |
Posted: Thu Jan 24, 2002 7:49 am Post subject: |
|
|
Novice
Joined: 13 Nov 2001 Posts: 15
|
Hi Kolban,
Thanks for your reply & suggestion. Hey, I have one more question. In my Java application, is it a good idea to cache MQ Connections and reuse them, or is it a best practice to establish connection every time I need to send a message ? We are using MQ JMS API.
Thanks,
Vasu. |
|
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
|
|
|
|