public void onMessage(Message message) {
try {
String correlationID = message.getJMSCorrelationID();
// lets notify the monitor for this response
ReplyHandler handler = null;
synchronized (this) {
handler = (ReplyHandler) requests.get(correlationID);
}
if (handler == null) {
log.warn("Response received for unknown request: " + message);
}
else {
boolean complete = handler.handle(message);
if (complete) {
synchronized (this) {
requests.remove(correlationID);
}
}