Logger.fatal("Cannot read "+filename);
fatalServerErrorOccurred();
}
}
// OK, check for instance specifics configuration
Properties newConfiguration = new OrderSafeProperties();
Pattern pattern = Pattern.compile("^%([a-zA-Z0-9_\\-]+)\\.(.*)$");
for (Object key : propsFromFile.keySet()) {
Matcher matcher = pattern.matcher(key + "");
if (!matcher.matches()) {
newConfiguration.put(key, propsFromFile.get(key).toString().trim());
}
}
for (Object key : propsFromFile.keySet()) {
Matcher matcher = pattern.matcher(key + "");
if (matcher.matches()) {
String instance = matcher.group(1);
if (instance.equals(id)) {
newConfiguration.put(matcher.group(2), propsFromFile.get(key).toString().trim());
}
}
}
propsFromFile = newConfiguration;
// Resolve ${..}