try
{
if(message.getJMSReplyTo() != null)
{
Destination destination = message.getJMSReplyTo();
Connection conn = connectionFactory.createConnection();
try
{
Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
MessageProducer producer = session.createProducer(destination);
producer.send(destination, message);
producer.close();
session.close();
}
finally
{
conn.close();
}
}
else
log.info("no reply to specified");
}
catch(JMSException e)
{
throw new EJBException(e);
}