private static final Log log = LogFactory.getLog(ServiceBusUtils.class);
public static String getSynapseConfigAbsPath(ServerContextInformation contextInformation) {
String carbonHome = CarbonUtils.getCarbonHome();
ServerConfigurationInformation configInfo = getSynapseServerConfigInfo(contextInformation);
if (configInfo == null) {
String msg = "Unable to obtain ESB server configuration information";
log.warn(msg);
throw new SynapseException(msg);
}
File synapseConfigFile = new File(configInfo.getSynapseXMLLocation());
String synapseConfigPath;
if (synapseConfigFile.isAbsolute()) {
synapseConfigPath = synapseConfigFile.getAbsolutePath();
} else {
synapseConfigPath = new File(carbonHome.trim(),
configInfo.getSynapseXMLLocation()).getAbsolutePath();
}
return synapseConfigPath;
}