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();