This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
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

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.

I think, therefore I exist -- Rene Descartes
GeeCON Prague 2014
subject: MessageListener, P2P for JMS