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

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
I agree. Here's the link:
subject: MessageListener, P2P for JMS
It's not a secret anymore!