|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Can a client connect to different Queue Managers in the same |
« View previous topic :: View next topic » |
Author |
Message
|
rliang |
Posted: Tue Sep 25, 2001 4:53 pm Post subject: |
|
|
Novice
Joined: 12 Aug 2001 Posts: 14
|
I want to write a program in VB to check the channels status, the channels could be in different Queue Manager (in Win2k same machine), my question is how can i connect to different queue manager in my program as the queue managers are listening to different ports ? What is the best way to do this task
Ray |
|
Back to top |
|
 |
kolban |
Posted: Tue Sep 25, 2001 7:41 pm Post subject: |
|
|
 Grand Master
Joined: 22 May 2001 Posts: 1072 Location: Fort Worth, TX, USA
|
Ray, in VB, you have a choice of APIs to use to connect to a queue manager. Either the MQI API or the COM objects. Which are you using? |
|
Back to top |
|
 |
rliang |
Posted: Tue Sep 25, 2001 8:26 pm Post subject: |
|
|
Novice
Joined: 12 Aug 2001 Posts: 14
|
kolban
I tried both API and ActiveX com interface. Connecting to the Queue manager relies on the environment variable MQSERVER's setting, I try to set it to the different values related to the different Queue manager on the fly by using Win32 API befor I call the MQCONN, it didnot works.
Ray |
|
Back to top |
|
 |
Cliff |
Posted: Wed Sep 26, 2001 12:26 am Post subject: |
|
|
Centurion
Joined: 27 Jun 2001 Posts: 145 Location: Wiltshire
|
A client can only connect to one queue manager at a time, and using the MQSERVER is only one way of controlling the connection. Another is to use the MQCHLLIB environment variable to specify the filepath of the channel table for the queue manager you want to connect to. The channel table can hold entries for more than one queue manager, but I've never found this convenient.
How about holding the filepaths of your channel tables in a .INI file, and using a Win32 API call from your VB app to set MQCHLLIB before issuing the MQCONN call? You would have to disconnect before trying to connect to a different queue manager, of course.
Hope this helps,
Cliff |
|
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
|
|
|
|