public NodeConfiguration loadConfiguration(InputStream xml) {
try {
XMLInputFactory inputFactory = getFactory(XMLInputFactory.class);
XMLOutputFactory outputFactory = getFactory(XMLOutputFactory.class);
XMLStreamReader reader = inputFactory.createXMLStreamReader(xml);
NodeConfigurationProcessor processor = new NodeConfigurationProcessor(this, inputFactory, outputFactory);
reader.nextTag();
NodeConfiguration config = processor.read(reader);
xml.close();
return config;
} catch (Throwable e) {
throw new ServiceRuntimeException(e);
}