Meaningless Drivel is fun!*
The moose likes EJB and other Java EE Technologies and the fly likes  MessageListener, P2P for JMS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark " MessageListener, P2P for JMS" Watch " MessageListener, P2P for JMS" New topic
Author

MessageListener, P2P for JMS

Sam Gehouse
Ranch Hand

Joined: Jul 21, 2003
Posts: 281
If I am doing a P2P MessageReceiver (Not using MDB), how can the MessageReceiver be informed of any message that is put into the queue? Do I need to implement MessageListener interface for that?
Valentin Tanase
Ranch Hand

Joined: Feb 17, 2005
Posts: 704
Hi Sam,

Message consumer can receive messages synchronously by explicitly calling the consumer�s receive() method or asynchronously by registering a callback object that implements MessageListner interface. If you just need to be notified when a message arrives, then you'll mostly need an asynchronous listener.
Regards.


I think, therefore I exist -- Rene Descartes
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: MessageListener, P2P for JMS