}
// domain.xml
public static ExtensibleConfigurationPersister createDomainXmlConfigurationPersister(final ConfigurationFile file, ExecutorService executorService, ExtensionRegistry extensionRegistry) {
DomainXml domainXml = new DomainXml(Module.getBootModuleLoader(), executorService, extensionRegistry);
BackupXmlConfigurationPersister persister = new BackupXmlConfigurationPersister(file, new QName(Namespace.CURRENT.getUriString(), "domain"), domainXml, domainXml);
for (Namespace namespace : Namespace.values()) {
if (!namespace.equals(Namespace.CURRENT)) {
persister.registerAdditionalRootElement(new QName(namespace.getUriString(), "domain"), domainXml);
}
}
extensionRegistry.setWriterRegistry(persister);
return persister;
}