Author |
Message
|
flahunter |
Posted: Thu Nov 19, 2009 11:16 pm Post subject: get local queue name by JAVA |
|
|
 Acolyte
Joined: 30 Oct 2008 Posts: 62
|
Hi, everyone
As we know, local queue can has it's alias queue. So my question is how to get local queue name with alias queue name by JAVA. Please help |
|
Back to top |
|
 |
AkankshA |
Posted: Thu Nov 19, 2009 11:26 pm Post subject: |
|
|
 Grand Master
Joined: 12 Jan 2006 Posts: 1494 Location: Singapore
|
in runmqsc when u do a display qa(*), it will show you all alias queue names along with their target local queues....
and i suppose coding to get that is not as easy as one may expect.... so  _________________ Cheers |
|
Back to top |
|
 |
manicminer |
Posted: Fri Nov 20, 2009 12:03 am Post subject: |
|
|
 Disciple
Joined: 11 Jul 2007 Posts: 177
|
Read the sticky post on Java and PCF in this forum section. Read the PCF manual to find out the right commands to use.
edit:
Or you might be able to open the queue using the alias name, then query the queue name using the Java API. I *think* that works, but I can't remember and I don't have a queue manager handy to try it on. _________________ Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime. |
|
Back to top |
|
 |
Vitor |
Posted: Fri Nov 20, 2009 4:45 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
You were advised here that you're reinventing the wheel.
Rather than fight with PCF messages, use one of the support pacs. Much easier and less maintenance.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
zpat |
Posted: Fri Nov 20, 2009 4:52 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
In an application you can MQINQ on the base queue name for an open alias queue.
Avoid using admin features of MQ unless you really need to develop an admin tool. |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Nov 20, 2009 9:27 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Well flahunter did not specify whether he was using base java or JMS...
Nor did he specify why he needed the target queue of an alias queue.
IMHO I'd tell him to use whatever queue he is given if in an app.
If using admin tools there's a number of them that are suitable...for that type of query...
 _________________ MQ & Broker admin |
|
Back to top |
|
 |
flahunter |
Posted: Sun Nov 22, 2009 11:20 pm Post subject: |
|
|
 Acolyte
Joined: 30 Oct 2008 Posts: 62
|
Thank you for all your comments.
I ask this question, because I tried to develop a tool to simplify my test process after I finish my MB flow development. I don't want to use so many tools to meet my detailed requirement because it will be so messy. Aslo I have no MQ client in my computer, that's why i cannot use some IBM admin tools.
As we know getCurrentDepth() method doesn't support alias queue, I can only use local queue, that's why I ask this questions.
Last edited by flahunter on Sun Nov 22, 2009 11:54 pm; edited 1 time in total |
|
Back to top |
|
 |
flahunter |
Posted: Sun Nov 22, 2009 11:32 pm Post subject: |
|
|
 Acolyte
Joined: 30 Oct 2008 Posts: 62
|
I know it's hard to build a tool again. But to make the life easier and make me more "lazy", I thinks it worths:) |
|
Back to top |
|
 |
Subha |
Posted: Mon Nov 23, 2009 1:46 am Post subject: |
|
|
Apprentice
Joined: 14 Nov 2006 Posts: 33 Location: Toronto
|
If you code with a Websphere MQ Base Java program , you can try using the property resolvedQueueName of MQGetMessageOptions and MQPutMessageOptions.
Just a thought. But you need MQ client installed. _________________ Subh |
|
Back to top |
|
 |
Vitor |
Posted: Mon Nov 23, 2009 6:17 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
flahunter wrote: |
I know it's hard to build a tool again. But to make the life easier and make me more "lazy", I thinks it worths:) |
Experience teaches not, but I hope it works out for you. I'll stick to making my life easier with support pacs and avoid unnecessary development.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Nov 23, 2009 3:10 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Have you looked at support pack MS0B?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|