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 Java / JMS » List all MQ Managers from remote host by Java

Post new topic  Reply to topic
 List all MQ Managers from remote host by Java « View previous topic :: View next topic » 
Author Message
xelas
PostPosted: Wed Aug 03, 2011 11:25 pm    Post subject: List all MQ Managers from remote host by Java Reply with quote

Newbie

Joined: 03 Aug 2011
Posts: 6

Hi All!
How can I list all MQ Manager's names from remote host?
Back to top
View user's profile Send private message
WMBDEV1
PostPosted: Wed Aug 03, 2011 11:49 pm    Post subject: Reply with quote

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
View user's profile Send private message
xelas
PostPosted: Thu Aug 04, 2011 12:02 am    Post subject: Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Thu Aug 04, 2011 3:55 am    Post subject: Reply with quote

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
View user's profile Send private message
xelas
PostPosted: Thu Aug 04, 2011 4:07 am    Post subject: Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Thu Aug 04, 2011 4:37 am    Post subject: Reply with quote

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
View user's profile Send private message
mqjeff
PostPosted: Thu Aug 04, 2011 4:40 am    Post subject: Reply with quote

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
View user's profile Send private message
xelas
PostPosted: Thu Aug 04, 2011 5:07 am    Post subject: Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Thu Aug 04, 2011 5:11 am    Post subject: Reply with quote

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
View user's profile Send private message
xelas
PostPosted: Thu Aug 04, 2011 10:17 am    Post subject: Reply with quote

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
View user's profile Send private message
gbaddeley
PostPosted: Thu Aug 04, 2011 6:12 pm    Post subject: Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Thu Aug 04, 2011 7:23 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
xelas
PostPosted: Tue Aug 16, 2011 10:00 pm    Post subject: Reply with quote

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
View user's profile Send private message
zpat
PostPosted: Tue Aug 16, 2011 11:26 pm    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

Read the mqs.ini file?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » List all MQ Managers from remote host by Java
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.