|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Is QueueManager is a server only API? |
« View previous topic :: View next topic » |
Author |
Message
|
lifeng |
Posted: Thu Mar 06, 2008 4:11 pm Post subject: Is QueueManager is a server only API? |
|
|
Apprentice
Joined: 11 Jan 2008 Posts: 46
|
Hi,
I have a .Net app accessing MQSeries queues through APIs. In my development environment, I have my app and MQSeries (both client and server) all installed and running on the same machine. Then in the app, I use the following code to connect to a queue manager:
mqQMgr = new MQQueueManager(qmname);
and the following code to open a queue:
mqQueue = mqQMgr->AccessQueue(qname, (int)options);
This seems working for me so far. But what I need eventually in production environment, is an application installed with the MQ Client ONLY, not the server, on the same box. Some people from our team suspect that the code above will only work if we have MQ Server installed local to the app (which is what we have now in our development environment) and it will stop working as soon as we move the MQ server off of box and leave only the client on it.
Could anybody tell me if I am using the wrong methods for the MQ client only API? If I am doing the wrong thing, then what should I do instead?
Thanks in advance!
Lifeng |
|
Back to top |
|
 |
vennela |
Posted: Thu Mar 06, 2008 4:53 pm Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
Add the following three lines before instantiating QMGR object
Code: |
MQEnvironment.port = 1414;
MQEnvironment.channel = "SYSTEM.DEF.SVRCONN";
MQEnvironment.hostname = "localhost"; |
|
|
Back to top |
|
 |
lifeng |
Posted: Thu Mar 06, 2008 6:10 pm Post subject: |
|
|
Apprentice
Joined: 11 Jan 2008 Posts: 46
|
Thank you so much Vennela for your response!
Please help me to understand a little more as I am really new to MQ. When you say add 3 lines before instanciating QMGR, do you mean that the code I use are actually working for both client and server, and to switch between them all I need is to change those 3 lines? The 3 lines you posted, do they assum the server is installed locally?
Thanks again for your help!
Lifeng |
|
Back to top |
|
 |
lifeng |
Posted: Thu Mar 06, 2008 7:15 pm Post subject: |
|
|
Apprentice
Joined: 11 Jan 2008 Posts: 46
|
I tried adding those 3 lines, without even changing the values, and now I am getting 2059 MQRC_Q_MGR_NOT_AVAILABLE error (I verified that before adding the 3 lines the code worked fine).
My question is: should I change the values, such as the port, to match whatever my QMGR is? Where is the port 1414 get set in the QMGR? I couldn't find it any where in the QMGR's properties. And what about the channel SYSTEM.DEF.SVRCONN, should I configure a channel with that name or it's just a default value and I don't need to worry about it?
I feel lost. Please advise!
Thanks a million!
Lifeng |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Mar 06, 2008 7:17 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Every time I feel lost, I real the Info Center until I feel unlost again.
If that doesn't work, I try things out and see if I can figure out what the Info Center is trying to tell me. _________________ I am *not* the model of the modern major general. |
|
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
|
|
|
|