Hello.

I am porting some code that previously ran as a MBean to use the EJB 3.0 MDB 
MessageListener interface.

Previously, my MBean would maintain its own JMS Connection and Session objects, 
however as an MDB, it appears I can only access the Message object itself. Is 
this correct?


In order to send an asynchronous response to a message, I previously use d the 
following code:


  | Destination tempDestination = msg.getJMSReplyTo();
  | 
  | // Create a temporary producer
  | MessageProducer tempProducer = session.createProducer(tempDestination);
  |                             
  | // Send the message
  | ObjectMessage objMsg = session.createObjectMessage(ack);
  | tempProducer.send(objMsg);
  |                             
  | // Close our temporary producer
  | tempProducer.close();
  | 

Now this code can only work if I have the same Session object that was used to 
receive the message prior to being passed to the onMessage() method.

Does anyone know how can I do this from an EJB3 MDB onMessage() handler?

Thanks!

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3929680#3929680

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3929680


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to