//String info = getServiceAddrInfoFromCBS(MSB_ADDR);\r
String info = getServiceAddrInfoFromCBS(getEnv(HOSTNAME));\r
log.info("Got the service information of \"" + getEnv(HOSTNAME) + "\" from CBS. The response is " + info + ".");\r
- JSONObject infoObj = JSONObject.fromObject(info);\r
- info = infoObj.has("msb.hostname") ? infoObj.getString("msb.hostname") : null;\r
+\r
if (info != null){\r
- msbServerInfo = split(info);\r
+ JSONObject infoObj = JSONObject.fromObject(info);\r
+ String msbInfoTmp = infoObj.has("msb.hostname") ? infoObj.getString("msb.hostname") : null;\r
+ if (msbInfoTmp != null) {\r
+ msbServerInfo = split(msbInfoTmp);\r
+ } else {\r
+ msbServerInfo = split(getEnv(MSB_ADDR));\r
+ }\r
} else {\r
msbServerInfo = split(getEnv(MSB_ADDR));\r
}\r
try {
response = getDcaeResponse(serviceAddrInfo);
} catch (Exception e) {
- throw new CorrelationException("Failed to connect to dcae", e);
+ throw new CorrelationException("Failed to connect to DCAE. ", e);
}
DcaeConfigurations dcaeConfigurations = null;
dcaeConfigurations = DcaeConfigurationParser.parse(response);