Resource configuration = resourceLoader.getResource(configurationUrl);
if (configuration.exists()) {
try {
parser.mergeEmbeddedJmxTransConfiguration(configuration.getInputStream(), newJmxTrans);
} catch (Exception e) {
throw new EmbeddedJmxTransException("Exception loading configuration " + configuration, e);
}
} else if (ignoreConfigurationNotFound) {
logger.debug("Ignore missing configuration file {}", configuration);
} else {
throw new EmbeddedJmxTransException("Configuration file " + configuration + " not found");
}
}
}
embeddedJmxTrans = newJmxTrans;
logger.info("Created EmbeddedJmxTrans with configuration {})", configurationUrls);