Author |
Message
|
xelas |
Posted: Wed Aug 03, 2011 11:25 pm Post subject: List all MQ Managers from remote host by Java |
|
|
Newbie
Joined: 03 Aug 2011 Posts: 6
|
Hi All!
How can I list all MQ Manager's names from remote host? |
|
Back to top |
|
 |
WMBDEV1 |
Posted: Wed Aug 03, 2011 11:49 pm Post subject: |
|
|
Sentinel
Joined: 05 Mar 2009 Posts: 888 Location: UK
|
You could connect to the box, execute dspmq and parse the results (all within Java) - nice and easy.
Why are you so insistent on doing it in Java though, such a trivial task may be better suited as a script of some sort.
What have you tried so far? |
|
Back to top |
|
 |
xelas |
Posted: Thu Aug 04, 2011 12:02 am Post subject: |
|
|
Newbie
Joined: 03 Aug 2011 Posts: 6
|
WMBDEV1 wrote: |
You could connect to the box, execute dspmq and parse the results (all within Java) - nice and easy.
Why are you so insistent on doing it in Java though, such a trivial task may be better suited as a script of some sort.
What have you tried so far? |
My task is list all MQ Objects including MQ Managers, Queues, Channels etc.. in WebSphereMQ runnning on zLinux from windows host. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Aug 04, 2011 3:55 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
xelas wrote: |
My task is list all MQ Objects including MQ Managers, Queues, Channels etc.. in WebSphereMQ runnning on zLinux from windows host. |
So why use Java?
Indeed, why do this at all? What value is the information to you? What use will it be put to?
Why not use scripts to build the objects, then use the scripts for whatever purpose you feel you need the information for? You can then put the scripts under source code control and thus control your WMQ estate. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
xelas |
Posted: Thu Aug 04, 2011 4:07 am Post subject: |
|
|
Newbie
Joined: 03 Aug 2011 Posts: 6
|
Vitor wrote: |
xelas wrote: |
My task is list all MQ Objects including MQ Managers, Queues, Channels etc.. in WebSphereMQ runnning on zLinux from windows host. |
So why use Java?
Indeed, why do this at all? What value is the information to you? What use will it be put to?
Why not use scripts to build the objects, then use the scripts for whatever purpose you feel you need the information for? You can then put the scripts under source code control and thus control your WMQ estate. |
My goal is to observe the configuration of the MQ. The configuration may vary from time to time and I need to preserve the history of changes. How to get remote queue manager objects, I know (PCF), but I do not know how to get a list of queue managers themselves |
|
Back to top |
|
 |
Vitor |
Posted: Thu Aug 04, 2011 4:37 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
xelas wrote: |
The configuration may vary from time to time and I need to preserve the history of changes. |
It shouldn't just vary, but be changed as a properly documented act of will. Hence my comment about scripts. Your method allows you to capture that a change has occured; the script method allows you to capture why it occured & also prevent undesirable changes.
xelas wrote: |
How to get remote queue manager objects, I know (PCF), but I do not know how to get a list of queue managers themselves |
There's no WMQ method I'm aware of but I imagine you could itterate through the system level information on the queue managers with non-WMQ Java methods easily enough. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Aug 04, 2011 4:40 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
You are far better off purchasing an MQ monitoring and management package.
Not only will it already do everything you've asked about, it will also allow you to centralize your administration of MQ, log all changes, and control who can make those changes.
And also let you know when something goes wrong. |
|
Back to top |
|
 |
xelas |
Posted: Thu Aug 04, 2011 5:07 am Post subject: |
|
|
Newbie
Joined: 03 Aug 2011 Posts: 6
|
Yes, ready monitoring solutions the best solution, but for the task I have to write your program.
Are there any ways get a list of queue managers on the remote machine (zLinux) on Java or C (CSharp) |
|
Back to top |
|
 |
Vitor |
Posted: Thu Aug 04, 2011 5:11 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
xelas wrote: |
Are there any ways get a list of queue managers on the remote machine (zLinux) on Java or C (CSharp) |
There's the ways I mentioned earlier in this thread.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
xelas |
Posted: Thu Aug 04, 2011 10:17 am Post subject: |
|
|
Newbie
Joined: 03 Aug 2011 Posts: 6
|
Thank you very much for taking part in solving my problem. I will try different ways. When I find a suitable solution - write it.
If you have any ideas - please write in this thread |
|
Back to top |
|
 |
gbaddeley |
Posted: Thu Aug 04, 2011 6:12 pm Post subject: |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
xelas wrote: |
Thank you very much for taking part in solving my problem. I will try different ways. When I find a suitable solution - write it.
If you have any ideas - please write in this thread |
The standard output of the 'dspmq' command is definitive. Any other method (such as walking directory structures and parsing .ini files) may change from MQ version to version (although going by the track record over the last 10+ years, this is unlikely to change). _________________ Glenn |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Aug 04, 2011 7:23 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Have you looked at support pack MS03?
I realize you can do the same in Java using MS0B but why reinvent the wheel?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
xelas |
Posted: Tue Aug 16, 2011 10:00 pm Post subject: |
|
|
Newbie
Joined: 03 Aug 2011 Posts: 6
|
fjb_saper wrote: |
Have you looked at support pack MS03?
I realize you can do the same in Java using MS0B but why reinvent the wheel?  |
No. Can you explain me about this? |
|
Back to top |
|
 |
zpat |
Posted: Tue Aug 16, 2011 11:26 pm Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
|
Back to top |
|
 |
|