jQuery in Action, 2nd edition*
The moose likes EJB and other Java EE Technologies and the fly likes How to receive message from a MDB? 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 "How to receive message from a MDB?" Watch "How to receive message from a MDB?" New topic
Author

How to receive message from a MDB?

Thomas Chang
Ranch Hand

Joined: May 13, 2008
Posts: 61
I created and deployed a MDB. I built a test client which send message to the MDB. It looks as follow:


Now I try to build a test client to receive the message. My codes look as folow:


But as I run it, but it seems it doesn't go to end. It is waiting...
Amit M Tank
Ranch Hand

Joined: Mar 28, 2004
Posts: 257
What you have written is a message listener and not an MDB. Your message listener program ends before the onMessage() method can be called on the Listener. You need to keep your program alive so that the onMessage method be called.


Amit Tank
Linked In
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to receive message from a MDB?