+ protected Object processResponse(AgentMC messageCreator,
+ boolean timeoutException) {
+ String correlationId = messageCreator.getCorrelationId();
+ String query = messageCreator.getQuery();
+ Message responseMsg = null;
+ try {
+ responseMsg = jmsTemplate.receiveSelected(responseDestination,
+ "JMSCorrelationID='" + correlationId + "'");
+ } catch (Exception e) {
+ throw new SlcException("Could not receive response from agent "
+ + agentUuid + " with correlationId " + correlationId
+ + " (query '" + query + "')", e);
+ }
+
+ if (responseMsg == null) {// timeout
+ if (timeoutException)
+ throw new SlcException("TIMEOUT: Query '" + query + "'"
+ + " with correlationId " + correlationId
+ + " sent to agent " + agentUuid + " timed out.");
+ else
+ return null;
+ }
+ if (log.isTraceEnabled())
+ log.debug("Received response for query '" + query
+ + "' with correlationId " + correlationId + " from agent "
+ + agentUuid);
+