Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

can we send the our message from onMessage method  RSS feed

 
Samanthi perera
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I send a message to Queue from jsp.
then the MDB listening to messages get the message from Queue and process.
it is ok.
I need to get the message out from MDB.can we do some redirect or dispatcher to send message to jsp or servlet?
 
Devaka Cooray
Marshal
Posts: 5322
575
Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
MDB are for accepting-messages only. If you need a duplex communication, it's better to choose another model.
 
Samanthi perera
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what can do MDB other than acceting messages?
 
Devaka Cooray
Marshal
Posts: 5322
575
Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nothing. Listening to messages, accepting messages, and processing messages is all what an MDB can do.
 
Samanthi perera
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I read that MDB can change the entity bean
Manning in Action EJB(Page 75/708)


All three of the processes persist data. The PlaceBidBean needs to add a bid
record to the database. Similarly, the PlaceOrderBean must add an order record.
Alternatively, the OrderBillingMDB updates the order record to reflect the results
of the billing process. These database changes are performed through two entities
in the JPA-managed persistence tier—the Bid and Order entities. While the
PlaceBidBean uses the Bid entity, the PlaceOrderBean and OrderBillingMDB use
the Order entity


[Devaka: Changed Code tags for Quote tags]
 
Devaka Cooray
Marshal
Posts: 5322
575
Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's what I meant by 'processing messages'. In fact, MDBs are Listeners - it listens to messages and does whatever it is supposed to do, once a message is received.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!