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 » Java utility

Post new topic  Reply to topic
 Java utility « View previous topic :: View next topic » 
Author Message
adivyayadav
PostPosted: Wed Nov 23, 2011 8:52 am    Post subject: Java utility Reply with quote

Novice

Joined: 09 Mar 2011
Posts: 10

I want to develop a utility in java. It takes some arguments like Q manager name,Ip address and port of QM.
And it searches for all the local queues under that Queue manager which are not empty and clears them using MQGet command.
I cannot find a command to return the queues with messages under a given manager. Can someone help me in this???
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Nov 23, 2011 9:07 am    Post subject: Re: Java utility Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

adivyayadav wrote:
II cannot find a command to return the queues with messages under a given manager. Can someone help me in this???


There isn't such a command. You'll need to code this. Something like:

- Obtain a list of all queues under a queue manager
- Inquire on the depth of each queue in the list
- If the depth is not zero clear the queue

It's easy enough in most languages, so presumably easy in Java.

Clearly your utility will need to differentiate in some way between messages which are stuck on the queue manager, and legitimately are on queues.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Nov 23, 2011 9:10 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

You might also want to look into some of the existing support pacs that can achieve this. Or most of this.

Depending on exactly what you're trying to do.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
adivyayadav
PostPosted: Wed Nov 23, 2011 9:11 am    Post subject: Reply with quote

Novice

Joined: 09 Mar 2011
Posts: 10

Even I am having trouble locating the command to find the list of queues under a Q manager.
Back to top
View user's profile Send private message
vmcgloin
PostPosted: Wed Nov 23, 2011 9:41 am    Post subject: Reply with quote

Knight

Joined: 04 Apr 2002
Posts: 560
Location: Scotland

What have you tried?
Have you written similar java code before? Maybe try some backgorund reading?
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Nov 23, 2011 9:42 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

adivyayadav wrote:
Even I am having trouble locating the command to find the list of queues under a Q manager.


If you can't find that, you probably shouldn't be trying to write a utility untill you've become a lot more familar with the documentation.

Especially as you first asked us to tell you this back in March here.

And again in May here. That's a long time to not find something.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Nov 23, 2011 11:07 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

You'll need a mix of pcf and mqi calls.
With the pcf calls you will find all queues with non 0 curdepth.
Be sure to exclude the system queues.
Using standard mqi calls you will need to empty the queues.

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Java utility
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.