Re: Multiple Queue Managers on 1 server

2003-06-25 Thread Tim Armstrong
No you just need to define one sever connection channel in each queue
manager. As for the MQSERVER environment variable the answer depends on how
you intend to use MQ. As far as environment variables go MQSERVER can only
point to one queue manager at a time so if you need to connect to both
queue managers from the same application you will need to look up how to
use the MQCHLLIB and MQCHLTAB environment variables, but if you are only
going run one application to one queue manager at a time then you could set
the MQSERVER variable just before running the program.

The other alternative is to use the MQCONNX call when doing a client
connection to a queue manager. I have included a 'C' code snippet below to
show how it is used. Note that there are JAVA calls that can also do this,
I'm sure one of the JAVA gurus round here can provide a code snippet or two
to show how it works in JAVA.

MQCNO   connectOpts = {MQCNO_DEFAULT};
MQCDclientDef   = {MQCD_CLIENT_CONN_DEFAULT};

strncpy(clientDef.ConnectionName, connName, MQ_CONN_NAME_LENGTH);
strncpy(clientDef.ChannelName, channelName, MQ_CHANNEL_NAME_LENGTH);

connectOpts.ClientConnPtr = &clientDef;
connectOpts.Version = MQCNO_VERSION_2;

MQCONNX(qMgrName,&connectOpts,&hConn,&compCode,&reasonCode);

Regards
Tim A



  Rommel Uy
  <[EMAIL PROTECTED]To:   [EMAIL PROTECTED]
  BM.COM>  cc:
  Sent by: MQSeriesSubject:  Multiple Queue Managers on 1 
server
  List
  <[EMAIL PROTECTED]
  N.AC.AT>


  26/06/2003 09:19
  Please respond to
  MQSeries List





Hello,

I am new to MQSeries, I am trying to create at least 2 queue managers on
one AIX machine. Each queue manager is for a separate application and do
not need to know the existence of the other. There will be no default queue
manager. I have configured one port for each in /etc/services, and 2
entries in inetd.conf, I have also created the queue managers and
respective queues.

Question : Do I need to create 2 server connection channels for each ? (eg
a CHANNEL1 and a CHANNEL2) If I do, what do I do with environment variable
MQSERVER ??

Any help is appreciated. Thanks

Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://vm.akh-wien.ac.at/MQSeries.archive

Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://vm.akh-wien.ac.at/MQSeries.archive


Re: Multiple Queue Managers on 1 server

2003-06-25 Thread Stefan Sievert
Rommel,
If you want to connect to more than one queue manager from a client
application, the MQSERVER variable will not work. Instead, you can either
use the MQCONNX call to specify your channel attributes within the
application code (see MQ Appl.Progr.Guide/Reference), or you can create what
is called a client channel table file. The manual MQSeries Clients explains
how to do that. Or you could just read through this thread on MQSeries.net:
http://www.mqseries.net/phpBB2/viewtopic.php?t=1732
Hope this helps,
Stefan

From: Rommel Uy <[EMAIL PROTECTED]>
Reply-To: MQSeries List <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Multiple Queue Managers on 1 server
Date: Wed, 25 Jun 2003 16:19:50 -0700
Hello,

I am new to MQSeries, I am trying to create at least 2 queue managers on
one AIX machine. Each queue manager is for a separate application and do
not need to know the existence of the other. There will be no default queue
manager. I have configured one port for each in /etc/services, and 2
entries in inetd.conf, I have also created the queue managers and
respective queues.
Question : Do I need to create 2 server connection channels for each ? (eg
a CHANNEL1 and a CHANNEL2) If I do, what do I do with environment variable
MQSERVER ??
Any help is appreciated. Thanks

Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://vm.akh-wien.ac.at/MQSeries.archive
_
The new MSN 8: advanced junk mail protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail
Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://vm.akh-wien.ac.at/MQSeries.archive