|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
How to get a list of Dynamic queue names |
« View previous topic :: View next topic » |
Author |
Message
|
meriton |
Posted: Sun Feb 15, 2004 10:05 pm Post subject: How to get a list of Dynamic queue names |
|
|
Novice
Joined: 07 Aug 2002 Posts: 24
|
We create a list of dynamic queues using Date and Business Type as part of the queue name, such as CLK.G2B.PHY.DEVL.ISS.20040216CCS* . When dynamic queues are processed, they are deleted. But if the process fail for whatever reason, how could we use the java inquire method to get a list of the names of the queues left over? it will be very helpful if some code can be providied provided. |
|
Back to top |
|
 |
bower5932 |
Posted: Mon Feb 16, 2004 6:52 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
Go look at SupportPac MS0B (java PCFs) and check out the sample program ListQueueNames.java. This program uses PCF messages to get a list of queue names. |
|
Back to top |
|
 |
chaian |
Posted: Thu Feb 26, 2004 6:48 am Post subject: pcf |
|
|
Novice
Joined: 30 Sep 2003 Posts: 14 Location: Italy
|
Yes, but PCF doesn't work if you need a list o queues from host.
I learned it kicking my head against the 3001 code error |
|
Back to top |
|
 |
RogerLacroix |
Posted: Thu Feb 26, 2004 9:15 am Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
Hi,
If by "host" you mean OS/390 or z/OS then true, you cannot use PCF. You need to send "Plain Text" commands to the command server.
Regards,
Roger Lacroix _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
chaian |
Posted: Mon Mar 01, 2004 6:24 am Post subject: |
|
|
Novice
Joined: 30 Sep 2003 Posts: 14 Location: Italy
|
A snippet of code is more powerful of hundreds posts :
[...]
int openOptions = MQC.MQOO_OUTPUT;
MQMessage message = new MQMessage();
MQQueueManager mqqm = new MQQueueManager("<YOUR_QMANAGER>");
String commandQueue = mqqm.getCommandInputQueueName();
String replyQueue = "SYSTEM.DEFAULT.LOCAL.QUEUE";
/* This is the core part of the code
Quote: |
You need to send "Plain Text" commands to the command server. |
*/
String command = "DISPLAY QUEUE(*) ALL";
MQQueue q = mqqm.accessQueue(commandQueue,openOptions);
message.replyToQueueName = replyQueue;
message.messageType = MQC.MQMT_REQUEST;
message.format = MQC.MQFMT_STRING;
byte[] b = command.getBytes();
message.write(b);
MQPutMessageOptions pmo = new MQPutMessageOptions();
message.messageId = MQC.MQMI_NONE;
q.put(message , pmo);
byte[] messageID = message.messageId;
q.close();
openOptions = MQC.MQOO_INPUT_AS_Q_DEF;
MQQueue rq = mqqm.accessQueue(replyQueue,openOptions);
/*
* this method retrieves response messages from reply queue,
* it uses the messageId to match the correlationId of the response
* messages
*/
ret = getCmqMessages(rq, message.messageId);
[...] |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|