}
protected Configuration createConfiguration() throws IOException, LogConfigurationException {
String[] names = {"org/codehaus/activemq/howl.properties", "org/codehaus/activemq/defaultHowl.properties"};
Configuration answer = null;
for (int i = 0; i < names.length; i++) {
InputStream in = Thread.currentThread().getContextClassLoader().getResourceAsStream(names[i]);
if (in == null) {
in = getClass().getClassLoader().getResourceAsStream(names[i]);
}
if (in != null) {
Properties properties = new Properties();
properties.load(in);
answer = new Configuration(properties);
}
}
if (answer == null) {
log.warn("Could not find file: " + names[0] + " or: " + names[1] + " on the classpath to initialise Howl");
answer = new Configuration();
}
if (directory != null) {
answer.setLogFileDir(directory.getAbsolutePath());
}
return answer;
}