Source:
public Collection<ServiceController<?>> installRuntimeServices(OperationContext context, ModelNode operation, ModelNode containerModel, ModelNode cacheModel) throws OperationFailedException { PathAddress configurationAddress = getCacheConfigurationAddressFromOperation(operation); PathAddress containerAddress = getCacheContainerAddressFromOperation(operation); String cacheName = configurationAddress.getLastElement().getValue(); String containerName = containerAddress.getLastElement().getValue(); ModelNode resolvedValue; final String templateConfiguration = (resolvedValue = CacheConfigurationResource.CONFIGURATION.resolveModelAttribute(context, cacheModel)).isDefined() ? resolvedValue.asString() : null; final ModuleIdentifier moduleId = ModelNodes.asModuleIdentifier(CacheConfigurationResource.CACHE_MODULE.resolveModelAttribute(context, cacheModel)); if (moduleId != null) { log.warnf("Found and ignored unsupported attribute 'module' in cache configuration %s from cache container %s", cacheName, containerName); } List<Dependency<?>> dependencies = new LinkedList<>(); ConfigurationBuilder builder = new ConfigurationBuilder().read(getDefaultConfiguration(this.mode)); builder.template(CacheConfigurationResource.TEMPLATE.resolveModelAttribute(context, cacheModel).asBoolean()); processModelNode(context, containerName, cacheModel, builder, dependencies); String defaultCache = CacheContainerResource.DEFAULT_CACHE.resolveModelAttribute(context, containerModel).asString(); ServiceTarget target = context.getServiceTarget(); Configuration config = builder.build(); Collection<ServiceController<?>> controllers = new ArrayList<>(3); controllers.add(installCacheConfigurationService(target, containerName, cacheName, defaultCache, templateConfiguration, builder, config, dependencies)); log.debugf("Cache configuration service for %s installed for container %s", cacheName, containerName); return controllers; }

Target:
public Collection<ServiceController<?>> installRuntimeServices(OperationContext context, ModelNode operation, ModelNode containerModel, ModelNode cacheModel) throws OperationFailedException { PathAddress configurationAddress = getCacheConfigurationAddressFromOperation(operation); PathAddress containerAddress = getCacheContainerAddressFromOperation(operation); String cacheName = configurationAddress.getLastElement().getValue(); String containerName = containerAddress.getLastElement().getValue(); ModelNode resolvedValue; final String templateConfiguration = (resolvedValue = CacheConfigurationResource.CONFIGURATION.resolveModelAttribute(context, cacheModel)).isDefined() ? resolvedValue.asString() : null; List<Dependency<?>> dependencies = new LinkedList<>(); ConfigurationBuilder builder = new ConfigurationBuilder().read(getDefaultConfiguration(this.mode)); builder.template(CacheConfigurationResource.TEMPLATE.resolveModelAttribute(context, cacheModel).asBoolean()); processModelNode(context, containerName, cacheModel, builder, dependencies); String defaultCache = CacheContainerResource.DEFAULT_CACHE.resolveModelAttribute(context, containerModel).asString(); ServiceTarget target = context.getServiceTarget(); Configuration config = builder.build(); Collection<ServiceController<?>> controllers = new ArrayList<>(3); controllers.add(installCacheConfigurationService(target, containerName, cacheName, defaultCache, templateConfiguration, builder, config, dependencies)); log.debugf("Cache configuration service for %s installed for container %s", cacheName, containerName); return controllers; }