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 » How do I find out the Sending Queue Name in a MDB?

Post new topic  Reply to topic
 How do I find out the Sending Queue Name in a MDB? « View previous topic :: View next topic » 
Author Message
HMed
PostPosted: Tue Dec 13, 2005 5:38 am    Post subject: How do I find out the Sending Queue Name in a MDB? Reply with quote

Novice

Joined: 17 Sep 2004
Posts: 17
Location: Camp Hill, PA. - USA

I have several MDB's that are kicked off when new messages are in their corresponding queues.

Does anybody know how can I get the queue name that the message was initially put into that kicked off the MDB?

I am assuming that I would use the MessageDrivenContext that is available in the MDB, but I'm not sure how to tie that back to the name.

Thanks.
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Tue Dec 13, 2005 5:50 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Do you want this information for logging purposes?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
HMed
PostPosted: Tue Dec 13, 2005 9:49 am    Post subject: Reply with quote

Novice

Joined: 17 Sep 2004
Posts: 17
Location: Camp Hill, PA. - USA

Yes, it is for logging.

After looking at this some more, I thought I might be able to get the queue name from the onMessage method with:

((Queue)msg.getJMSDestination()).getQueueName()

but msg.getJMSDestination() is giving me a null pointer exception.

Does anybody have any ideas?

Thanks.
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Tue Dec 13, 2005 10:01 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

I don't think the JMSDestination on the incoming message will be what you want. The JMSDestination is built on the ReplyToQueue and the ReplyToQmgr. This will only be set if the message expects a reply, and won't ever specify what queue the message is currently on.

A generic MQ message doesn't include information on what queue it is on.

You should see if you can get the session or the consumer associated with your MDB.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Dec 13, 2005 8:37 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20703
Location: LI,NY

The message properties might give you the information you seek.
Jeff you are referring to the JMSReplyTo information...

Anyway the easy way is to ask your WAS admin about the setup of the MDB.
You will get at least the jndi name and your MQ Admin should be able to give you the info you seek

Enjoy
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Wed Dec 14, 2005 4:57 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

fjb_saper wrote:
Jeff you are referring to the JMSReplyTo information...


Don't know how I got those confused.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » How do I find out the Sending Queue Name in a MDB?
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.