wood burning stoves 2.0*
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
Don't get me started about those stupid light bulbs.
subject: MessageListener, P2P for JMS
Similar Threads
Continually run MyMessageListener.java using JMS P2P in Cluster
is using while(true) loop in run mthd of thread good idea 2 make it wait indefinatley
What is p2p and what isn't?
How to handle SMS in J2ME
new to JMS , Que- what approach to take for continously listenning messages