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 Performance Monitoring » Little tool to make cluster queues visible on non FRs

Post new topic  Reply to topic
 Little tool to make cluster queues visible on non FRs « View previous topic :: View next topic » 
Author Message
sebastianhirt
PostPosted: Mon Mar 06, 2006 10:18 am    Post subject: Little tool to make cluster queues visible on non FRs Reply with quote

Yatiri

Joined: 07 Jun 2004
Posts: 620
Location: Germany

Hi,

This is mainly for the no-coders and newbies amongst us. I am not even sure whether or not there is already a tool out there to do this.

I have written a little code snippet in Java to make cluster queues visible on Partial Repositories before they are used by an application.

I found this quiet usefull for debugging purposes.

If somebody is interested, I can provide a compiled version for download. Just let me know.

After compiling this just type in the following (but please make sure your classpath is accurate)

Code:
java MakeQueueVisible <HostName> <port> <QueueManager Name> <Q Name> <Channel Name>


The Partial Repository QM must support client connections. And I believe that this will only work on distributed queue managers (Please tell me if I am wrong)

Any Feedback or suggestions are welcome, but I don't promise that I can/will put them in. Feel free to change/ pimp this code however you wish. But if you put in something usefull, remember the place where you got the original code from and make it available to the community.

cheers
Sebastian

Code:
import com.ibm.mq.*;


public class MakeQueueVisible {

   public static void main(String[] args) {
      
      if (args.length < 5){
         System.out.println("Please enter the correct number of parameters: ");
         System.out.println("java MakeQueueVisible <HostName> <port> <QueueManager Name> <Q Name> <Channel Name>");
         System.exit(1);
      }
      
      MQEnvironment.hostname    = args[0];
      MQEnvironment.port      = Integer.parseInt(args[1]);
      MQEnvironment.channel   = args[4];
      
      int mqoo      =  MQC.MQOO_OUTPUT ;
      
      try{
         MQQueueManager qm = new MQQueueManager(args[2]);
         MQQueue q = qm.accessQueue(args[3],mqoo);
         
         System.out.println("Connected to "
               + q.name.trim()
               + " on "
               + qm.name.trim()
               + "\n"
               + q.name.trim()
               + " should now be visible on the queueu manager "
               + qm.name.trim()
               + "!\n\n"
               + "Check out the following command on a runmqsc against "
               + qm.name.trim()
               + "\n"
               + "DISPLAY QCLUSTER('"
               + q.name.trim()
               + "')");
         q.close();
         qm.close();
         
      }catch(MQException mqe){
         mqe.printStackTrace();
      }

   }

}
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Mon Mar 06, 2006 11:37 am    Post subject: Re: Little tool to make cluster queues visible on non FRs Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

sebastianhirt wrote:

The Partial Repository QM must support client connections. And I believe that this will only work on distributed queue managers (Please tell me if I am wrong)

Same concept applies to z/OS QMs as well.
_________________
Peter Potkay
Keep Calm and MQ On


Last edited by PeterPotkay on Tue Mar 07, 2006 7:48 am; edited 1 time in total
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Mar 06, 2006 4:13 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

AMQSPUTC would work just as well, as long as you were careful about your typing...
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
wschutz
PostPosted: Mon Mar 06, 2006 4:26 pm    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

jefflowrey wrote:
AMQSPUTC would work just as well, as long as you were careful about your typing...
hey Jeff.... its "amqsputc" where I live ....
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
Nigelg
PostPosted: Tue Mar 07, 2006 12:07 am    Post subject: Reply with quote

Grand Master

Joined: 02 Aug 2004
Posts: 1046

Only for picky UNIX types. cAsE doeS nOT maTTeR on wINDowS.
_________________
MQSeries.net helps those who help themselves..
Back to top
View user's profile Send private message
mrlinux
PostPosted: Tue Mar 07, 2006 5:54 am    Post subject: Reply with quote

Grand Master

Joined: 14 Feb 2002
Posts: 1261
Location: Detroit,MI USA

Lots of things dont matter on windows, but thats a website unto itself
_________________
Jeff

IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries
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 Performance Monitoring » Little tool to make cluster queues visible on non FRs
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.