Finding the Queue Name Used or "EJB Name" of a Generic MDB in "onMessage()"
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   David_Turkel
Posted On:   Tuesday, March 2, 2004 07:32 AM

Hi, I'm trying to create a dispatcher-type framework using MDB's. I have a single MDB class (SimpleMDB), which I have configured to listen to multiple Queues, using different EJB Names for those queues. This mechanism works fine-- messages come in and execute the single onMessage() method regardless of queue. NOW- I need to find out either the configured EJB Name ("ejb-name" in the descriptor), or the queue name the message came in from to do my dispatching logic. Anyone have any ideas??? Thanks, David Turkel    More>>

Hi,


I'm trying to create a dispatcher-type framework using MDB's.


I have a single MDB class (SimpleMDB), which I have configured to listen to multiple Queues, using different EJB Names for those queues.


This mechanism works fine-- messages come in and execute the single onMessage() method regardless of queue.


NOW- I need to find out either the configured EJB Name ("ejb-name" in the descriptor), or the queue name the message came in from to do my dispatching logic.


Anyone have any ideas???


Thanks,


David Turkel

   <<Less

Re: Finding the Queue Name Used or "EJB Name" of a Generic MDB in "onMessage()"

Posted By:   Srivatsa_Manjunath  
Posted On:   Thursday, March 4, 2004 08:07 AM

Couple of ways I could think of. Either the message on the onMessage has some information of the target EJB/Queue.




javax.jms.Message getJMSDestination() returns a destination. Looks like this is a target destination, since these are references in java they should contain source information. Also not sure if getPropertyNames enumenration could have some information, depending on the container implementation.
About | Sitemap | Contact