Source:
<code>private void writeCacheContainer(XMLExtendedStreamWriter writer, ConfigurationHolder holder) throws XMLStreamException { writer.writeStartElement(Element.CACHE_CONTAINER); GlobalConfiguration globalConfiguration = holder.getGlobalConfiguration(); if (globalConfiguration != null) { writer.writeAttribute(Attribute.NAME, globalConfiguration.cacheManagerName()); if (globalConfiguration.shutdown().hookBehavior() != ShutdownHookBehavior.DEFAULT) { writer.writeAttribute(Attribute.SHUTDOWN_HOOK, globalConfiguration.shutdown().hookBehavior().name()); } writer.writeAttribute(Attribute.STATISTICS, String.valueOf(globalConfiguration.statistics())); if (globalConfiguration.nonBlockingThreadPool().threadPoolFactory() != null) { writer.writeAttribute(Attribute.NON_BLOCKING_EXECUTOR, globalConfiguration.nonBlockingThreadPoolName()); } if (globalConfiguration.expirationThreadPool().threadPoolFactory() != null) { writer.writeAttribute(Attribute.EXPIRATION_EXECUTOR, globalConfiguration.expirationThreadPoolName()); } if (globalConfiguration.listenerThreadPool().threadPoolFactory() != null) { writer.writeAttribute(Attribute.LISTENER_EXECUTOR, globalConfiguration.listenerThreadPoolName()); } if (globalConfiguration.blockingThreadPool().threadPoolFactory() != null) { writer.writeAttribute(Attribute.BLOCKING_EXECUTOR, globalConfiguration.blockingThreadPoolName()); } writeTransport(writer, globalConfiguration); writeSecurity(writer, globalConfiguration); writeSerialization(writer, globalConfiguration); writeMetrics(writer, globalConfiguration); writeJMX(writer, globalConfiguration); writeGlobalState(writer, globalConfiguration); writeExtraConfiguration(writer, globalConfiguration.modules()); } for (Entry<String, Configuration> configuration : holder.getConfigurations().entrySet()) { Configuration config = configuration.getValue(); switch (config.clustering().cacheMode()) { case LOCAL: writeLocalCache(writer, configuration.getKey(), config); break; case DIST_ASYNC: case DIST_SYNC: writeDistributedCache(writer, configuration.getKey(), config); break; case INVALIDATION_ASYNC: case INVALIDATION_SYNC: writeInvalidationCache(writer, configuration.getKey(), config); break; case REPL_ASYNC: case REPL_SYNC: writeReplicatedCache(writer, configuration.getKey(), config); break; default: break; } <START> writeExtraConfiguration(writer, config.modules()); <END> } }</code><technical_language>want include this in a separate PR. I worry if this is tested, xml schema validation ordered</technical_language>

Target:
private void writeCacheContainer(XMLExtendedStreamWriter writer, ConfigurationHolder holder) throws XMLStreamException { writer.writeStartElement(Element.CACHE_CONTAINER); GlobalConfiguration globalConfiguration = holder.getGlobalConfiguration(); if (globalConfiguration != null) { writer.writeAttribute(Attribute.NAME, globalConfiguration.cacheManagerName()); if (globalConfiguration.shutdown().hookBehavior() != ShutdownHookBehavior.DEFAULT) { writer.writeAttribute(Attribute.SHUTDOWN_HOOK, globalConfiguration.shutdown().hookBehavior().name()); } writer.writeAttribute(Attribute.STATISTICS, String.valueOf(globalConfiguration.statistics())); if (globalConfiguration.nonBlockingThreadPool().threadPoolFactory() != null) { writer.writeAttribute(Attribute.NON_BLOCKING_EXECUTOR, globalConfiguration.nonBlockingThreadPoolName()); } if (globalConfiguration.expirationThreadPool().threadPoolFactory() != null) { writer.writeAttribute(Attribute.EXPIRATION_EXECUTOR, globalConfiguration.expirationThreadPoolName()); } if (globalConfiguration.listenerThreadPool().threadPoolFactory() != null) { writer.writeAttribute(Attribute.LISTENER_EXECUTOR, globalConfiguration.listenerThreadPoolName()); } if (globalConfiguration.blockingThreadPool().threadPoolFactory() != null) { writer.writeAttribute(Attribute.BLOCKING_EXECUTOR, globalConfiguration.blockingThreadPoolName()); } writeTransport(writer, globalConfiguration); writeSecurity(writer, globalConfiguration); writeSerialization(writer, globalConfiguration); writeMetrics(writer, globalConfiguration); writeJMX(writer, globalConfiguration); writeGlobalState(writer, globalConfiguration); writeExtraConfiguration(writer, globalConfiguration.modules()); } for (Entry<String, Configuration> configuration : holder.getConfigurations().entrySet()) { Configuration config = configuration.getValue(); switch (config.clustering().cacheMode()) { case LOCAL: writeLocalCache(writer, configuration.getKey(), config); break; case DIST_ASYNC: case DIST_SYNC: writeDistributedCache(writer, configuration.getKey(), config); break; case INVALIDATION_ASYNC: case INVALIDATION_SYNC: writeInvalidationCache(writer, configuration.getKey(), config); break; case REPL_ASYNC: case REPL_SYNC: writeReplicatedCache(writer, configuration.getKey(), config); break; default: break; } } }