|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
using CCDT - TAB file to connect to multiple queue managers |
« View previous topic :: View next topic » |
Author |
Message
|
rcrook89 |
Posted: Thu Mar 06, 2014 10:58 am Post subject: using CCDT - TAB file to connect to multiple queue managers |
|
|
Newbie
Joined: 06 Mar 2014 Posts: 1
|
I'm currently using a TAB file to connect to a queue manager without the program specifying the queue manager name. This works fine when only connecting to one queue manager.
I've been tasked with adding a second program of the same nature, that doesn't specify the queue manager name. However, this program needs to connect to a queue on a different queue manager.
To do this, I created a queue manager group, both with a blank queue manager name. The problem is that the client will choose the first available channel in the list. if it chooses the queue manager that doesn't have that programs queue, then it will fail with a reason code 2085.
For reasons beyond my control, we cant specify the queue manager name in the code. I've also been told I have to have both programs working on the same server (windows server 2008), connecting to two different queue managers. What is the best way to do this?
Is it possible to have each program use their own TAB or mqclient.ini file? |
|
Back to top |
|
 |
exerk |
Posted: Thu Mar 06, 2014 11:12 am Post subject: Re: using CCDT - TAB file to connect to multiple queue manag |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
rcrook89 wrote: |
Is it possible to have each program use their own TAB or mqclient.ini file? |
Yes. If you're on V7.x (which you should be) have a look in the Info Centre in regard to the mqclient.ini file, which now gives you a lot of power in how you can specify an 'environment' unique to each client. _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
PaulClarke |
Posted: Thu Mar 06, 2014 1:26 pm Post subject: |
|
|
 Grand Master
Joined: 17 Nov 2005 Posts: 1002 Location: New Zealand
|
Each process can have its own MQ client INI file which is set by environment variable MQCLNTCF. However, if you just want each process to have their own CCDT then you just need to set environment variables MQCHLLIB and MQCHLTAB to point to the location of your ccdt. These two environment variables have been available since the very first versions of the client.
Cheers,
Paul. _________________ Paul Clarke
MQGem Software
www.mqgem.com |
|
Back to top |
|
 |
exerk |
Posted: Fri Mar 07, 2014 1:31 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
PaulClarke wrote: |
Each process can have its own MQ client INI file which is set by environment variable MQCLNTCF. However, if you just want each process to have their own CCDT then you just need to set environment variables MQCHLLIB and MQCHLTAB to point to the location of your ccdt. These two environment variables have been available since the very first versions of the client.
Cheers,
Paul. |
Just out of curiosity, why advocate the use of variables and not the 'native' search path hierarchy to locate the mqclient.ini file? _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
PaulClarke |
Posted: Fri Mar 07, 2014 1:48 am Post subject: |
|
|
 Grand Master
Joined: 17 Nov 2005 Posts: 1002 Location: New Zealand
|
I'm sorry, I didn't really think I was advocating anything. If anything I think was suggesting that you shouldn't need to bother with the INI file at all.
I guess I tend to use environment variables myself because it is nice and specific. What are you advocating? Putting the INI file in the working directory or the users home directory? Neither seem totally ideal to me if you just want two different programs to use two different files. However, perhaps there's an option I've forgotten about. It's quite a few years since I wrote this code
Cheers,
Paul. _________________ Paul Clarke
MQGem Software
www.mqgem.com |
|
Back to top |
|
 |
exerk |
Posted: Fri Mar 07, 2014 2:11 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
PaulClarke wrote: |
I'm sorry, I didn't really think I was advocating anything. If anything I think was suggesting that you shouldn't need to bother with the INI file at all.
I guess I tend to use environment variables myself because it is nice and specific. What are you advocating? Putting the INI file in the working directory or the users home directory? Neither seem totally ideal to me if you just want two different programs to use two different files. However, perhaps there's an option I've forgotten about. It's quite a few years since I wrote this code
Cheers,
Paul. |
Since the introduction of the mqclient.ini file I have been trying to encourage the use of it and move away from the use of the variables, especially as in large client footprints I can now provide a CCDT file, Key Store files, and mqclient.ini file to the user and know that fault diagnosis will be a lot easier, complexity for the application slightly reduced, i.e. no requirement to set up the WMQ environment prior to execution, and a lot more flexibility as far as I'm concerned - no more an application setting the variables globally and screwing up everyone else!
And of course, now that there are no versions GA that do not support the mqclient.ini file I do wonder if WMQ next etc. (or some version long down the line) will continue to support them  _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
PaulClarke |
Posted: Fri Mar 07, 2014 2:41 am Post subject: |
|
|
 Grand Master
Joined: 17 Nov 2005 Posts: 1002 Location: New Zealand
|
I'm still not quite sure what you are advocating. I can see that if you wanted a different MQ setup per user then this should be fairly straightforward, you can put it in the users home directory. Although this potentially a maintenance headache if you want to make a global change to all the file.
However, the question was suppose you have two different programs on your machine. Both programs connect to a blank queue manager and yet he wants them to always resolve to different Queue Managers. What are you saying your solution would be? Forgive me if I'm being thick here.
As for MQ environment variables being removed I can't help thinking that is extremely unlikely. MQ has a very strong tradition of maintaining behaviour from one release to the next. There would have to be a very good reason why the variables need to be removed in favour of the INI file approach and I just don't see it.
Cheers,
Paul. _________________ Paul Clarke
MQGem Software
www.mqgem.com |
|
Back to top |
|
 |
exerk |
Posted: Fri Mar 07, 2014 3:24 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
PaulClarke wrote: |
I'm still not quite sure what you are advocating. I can see that if you wanted a different MQ setup per user then this should be fairly straightforward, you can put it in the users home directory. Although this potentially a maintenance headache if you want to make a global change to all the file. |
Perhaps my use of the word 'advocating' was incorrect - although it does seem to have triggered a debate. Generally, I request the users to place the mqclient.ini file in the application working directory and as I endeavour to ensure each file is 'unique' to each WMQ Client user, the only changes I should be making are to the CCDT file etc. specified therein. If the applications can make use of a 'common' mqclient.ini file I use the one in the WMQ installation path...
PaulClarke wrote: |
However, the question was suppose you have two different programs on your machine. Both programs connect to a blank queue manager and yet he wants them to always resolve to different Queue Managers. What are you saying your solution would be? Forgive me if I'm being thick here. |
You're not being thick; if anything I am expressing myself with my usual lack of clarity. In the OPs case, I would provide two mqclient.ini files, each tailored to reference a CCDT file appropriate to achieve the connection, and have the application place the mqclient.ini file as stated above - and I know the same thing can be achieved using the variables...
It works for me, but acknowledge that it won't work for everyone.
PaulClarke wrote: |
As for MQ environment variables being removed I can't help thinking that is extremely unlikely. MQ has a very strong tradition of maintaining behaviour from one release to the next. There would have to be a very good reason why the variables need to be removed in favour of the INI file approach and I just don't see it... |
I like playing devil's advocate, and throwing pebbles in the pond to see the ripples spread  _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
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
|
|
|
|