}
}
}
private ModelNode loadServerModel(final File file) throws Exception {
final ExtensionRegistry extensionRegistry = new ExtensionRegistry(ProcessType.STANDALONE_SERVER, new RunningModeControl(RunningMode.NORMAL));
final QName rootElement = new QName(Namespace.CURRENT.getUriString(), "server");
final StandaloneXml parser = new StandaloneXml(Module.getBootModuleLoader(), null, extensionRegistry);
final XmlConfigurationPersister persister = new XmlConfigurationPersister(file, rootElement, parser, parser);
for (Namespace namespace : Namespace.values()) {
if (namespace != Namespace.CURRENT) {
persister.registerAdditionalRootElement(new QName(namespace.getUriString(), "server"), parser);
}
}
extensionRegistry.setWriterRegistry(persister);
final List<ModelNode> ops = persister.load();
final ModelNode model = new ModelNode();
final ModelController controller = createController(ProcessType.STANDALONE_SERVER, model, new Setup() {
public void setup(Resource resource, ManagementResourceRegistration rootRegistration) {