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 » get local queue name by JAVA

Post new topic  Reply to topic
 get local queue name by JAVA « View previous topic :: View next topic » 
Author Message
flahunter
PostPosted: Thu Nov 19, 2009 11:16 pm    Post subject: get local queue name by JAVA Reply with quote

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
View user's profile Send private message
AkankshA
PostPosted: Thu Nov 19, 2009 11:26 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
manicminer
PostPosted: Fri Nov 20, 2009 12:03 am    Post subject: Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Fri Nov 20, 2009 4:45 am    Post subject: Reply with quote

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
View user's profile Send private message
zpat
PostPosted: Fri Nov 20, 2009 4:52 am    Post subject: Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Fri Nov 20, 2009 9:27 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
flahunter
PostPosted: Sun Nov 22, 2009 11:20 pm    Post subject: Reply with quote

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
View user's profile Send private message
flahunter
PostPosted: Sun Nov 22, 2009 11:32 pm    Post subject: Reply with quote

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
View user's profile Send private message
Subha
PostPosted: Mon Nov 23, 2009 1:46 am    Post subject: Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Mon Nov 23, 2009 6:17 am    Post subject: Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Mon Nov 23, 2009 3:10 pm    Post subject: Reply with quote

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
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 » get local queue name by JAVA
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.