Author |
Message
|
sebastianhirt |
Posted: Mon Mar 06, 2006 10:18 am Post subject: Little tool to make cluster queues visible on non FRs |
|
|
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 |
|
 |
PeterPotkay |
Posted: Mon Mar 06, 2006 11:37 am Post subject: Re: Little tool to make cluster queues visible on non FRs |
|
|
 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 |
|
 |
jefflowrey |
Posted: Mon Mar 06, 2006 4:13 pm Post subject: |
|
|
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 |
|
 |
wschutz |
Posted: Mon Mar 06, 2006 4:26 pm Post subject: |
|
|
 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 |
|
 |
Nigelg |
Posted: Tue Mar 07, 2006 12:07 am Post subject: |
|
|
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 |
|
 |
mrlinux |
Posted: Tue Mar 07, 2006 5:54 am Post subject: |
|
|
 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 |
|
 |
|