if (prop == null) {
log.severe("The statement id is not specified, can not process it");
return "OK"; // we don't want to stop the dispatcher
}
String reqId = prop.getStringValue();
SqlStatement sqlStatement = (SqlStatement)this.sqlStatementMap.get(reqId);
if (sqlStatement == null) {
log.severe("The statement with id '" + reqId + "' has not been found");
return "OK"; // we don't want to stop the dispatcher
}
prop = (ClientProperty)updateQos.getClientProperties().get(EXCEPTION_ATTR);
String response = null;
boolean isException = false;
if (prop != null) {
response = prop.getStringValue();
isException = true;
}
prop = (ClientProperty)updateQos.getClientProperties().get(MASTER_ATTR);
if (prop != null) { // then it is the response from the master
String replPrefix = prop.getStringValue();
if (response == null)
response = new String(content);
sqlStatement.setResponse(replPrefix, response, isException);
}
else {
if (response == null)
response = new String(content);
sqlStatement.setResponse(senderSession.getRelativeName(), response, isException);
}
}
// 2. This is the response coming from a DbWatcher on a request for initial update which one of the ReplSlaves has previously requested.
else if ("INITIAL_DATA_RESPONSE".equals(request)) {
long minReplKey = updateQos.getClientProperty("_minReplKey", 0L);