use of com.ing.ifsa.IFSAServerQueueSender in project iaf by ibissource.
the class IfsaFacade method sendReply.
/**
* Intended for server-side reponse sending and implies that the received
* message *always* contains a reply-to address.
*/
public void sendReply(QueueSession session, Message received_message, String response) throws IfsaException {
QueueSender tqs = null;
try {
TextMessage answer = session.createTextMessage();
answer.setText(response);
Queue replyQueue = (Queue) received_message.getJMSReplyTo();
tqs = session.createSender(replyQueue);
if (log.isDebugEnabled())
log.debug(getLogPrefix() + "sending reply to [" + received_message.getJMSReplyTo() + "]");
((IFSAServerQueueSender) tqs).sendReply(received_message, answer);
} catch (Throwable t) {
throw new IfsaException(t);
} finally {
if (tqs != null) {
try {
tqs.close();
} catch (JMSException e) {
log.warn(getLogPrefix() + "exception closing reply queue sender", e);
}
}
}
}
Aggregations