ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ API Support » How to use MQAX to connect to different MQ server dynamicly?

Post new topic  Reply to topic
 How to use MQAX to connect to different MQ server dynamicly? « View previous topic :: View next topic » 
Author Message
tony.ye
PostPosted: Thu Feb 24, 2005 3:51 am    Post subject: How to use MQAX to connect to different MQ server dynamicly? Reply with quote

Newbie

Joined: 24 Feb 2005
Posts: 3

I'm using MQAX200 to develop a MQ adapter using VB6.
The requirement is that if it fails to connect primary MQ server, it should try to connect to secondary MQ server.

Client is running on Windows 2000 professional.
MQ Server is a Windows Server.

I don't know how to implement this.
Need your help. Thanks.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Feb 24, 2005 6:46 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Your requirement is your answer.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
tony.ye
PostPosted: Thu Feb 24, 2005 5:42 pm    Post subject: Reply with quote

Newbie

Joined: 24 Feb 2005
Posts: 3

As I know, the server channel is defined in MQServer windows enviroment variable.

MQSERVER=channel_name/tcp/tcp_name

I tried to change Windows variable MQSERVER by calling API, but it didn't work.

Is there any way to set MQServer, channel and port in program?
Back to top
View user's profile Send private message
kevinf2349
PostPosted: Thu Feb 24, 2005 6:42 pm    Post subject: Reply with quote

Grand Master

Joined: 28 Feb 2003
Posts: 1311
Location: USA

The answer is "yes" but what language are you using?

I have an example in VB.Net and I will post tomorrow when I am at work.

The MQ Client manual has other language examples I believe.



ps. I have just searched on the net and it appears that in Java you do :

Code:
MQEnvironment.hostname = "host.domain.com";
MQEnvironment.channel  = "java.client.channel";

Back to top
View user's profile Send private message
tony.ye
PostPosted: Thu Feb 24, 2005 6:59 pm    Post subject: Reply with quote

Newbie

Joined: 24 Feb 2005
Posts: 3

Using Visual Basic 6 and MQAX200
Back to top
View user's profile Send private message
rajesh_avrs
PostPosted: Thu Feb 24, 2005 11:06 pm    Post subject: Reply with quote

Apprentice

Joined: 18 May 2001
Posts: 31

Tony,

You can not set the HostName, Channel & Port in your VB Program like you can do in Java or .NET languages.

In the good old C++ and VB the only of achieving what you want is to use MQCHLLIB & MQCHLTAB environment variables.

Basically, you need to create a Channel Table file containing two entries, first one pointing to your primary server and second one pointing to your secondary server.

While creating the channel table file, ensure you specify the SAME queue manager (let's say XYZ) in both the Primary Server connection channel and the Secondary connection channel.

From the client code, while issuing MQCONN, specify the Queue Manager name as *XYZ. Note the *, it does something special.

It's a long stuff to be explained here. But if you need more detais, I would suggest you to get the MQ Clients manual. There is a whole section dedicated for creating and using Channel Table files.

Even though this solution satisfies your requirement, please be advised that this is not the best High Availability solution.

There are so many other ways of doing this (ofcourse, you have to spend money on hardware, configuration etc.,)

Cheers,
Rajesh
_________________
****************
MQSeries is cool
****************
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » How to use MQAX to connect to different MQ server dynamicly?
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.