Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to receive message from a MDB?

 
Thomas Chang
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic