public ModelNode createNewCacheContainerRequest(String name, String defaultCacheName) {
        String dmrTemplate = "" //
                + "{" //
                + "\"default-cache-name\" => \"%s\" ," //
                + "\"jndi-name\" => \"%s\" " //
                + "}";

        String jndiName = "java:jboss/infinispan/" + name;
        String dmr = String.format(dmrTemplate, defaultCacheName, jndiName);

        Address addr = Address.root().add(SUBSYSTEM, SUBSYSTEM_INFINISPAN, CACHE_CONTAINER, name);
        final ModelNode result = ModelNode.fromString(dmr);
        result.get(OPERATION).set(ADD);
        result.get(ADDRESS).set(addr.getAddressNode());

        return result;
    }
public ModelNode createNewCacheContainerRequest ( String name , String defaultCacheName ) { String dmrTemplate = "" + "{" + "\"default-cache-name\" => \"%s\" ," + "\"jndi-name\" => \"%s\" " + "}" ; String jndiName = "java:jboss/infinispan/" + name ; String dmr = String . format ( dmrTemplate , defaultCacheName , jndiName ) ; Address addr = Address . root ( ) . add ( SUBSYSTEM , SUBSYSTEM_INFINISPAN , CACHE_CONTAINER , name ) ; final ModelNode result = ModelNode . fromString ( dmr ) ; result . get ( OPERATION ) . set ( ADD ) ; result . get ( ADDRESS ) . set ( addr . getAddressNode ( ) ) ; return result ; }
Returns a ModelNode that can be used to create a cache container configuration for
subsequent cache configuration. Callers are free to tweak the request that is returned,
if they so choose, before asking the client to execute the request.
<p>
The JNDI name will be java:jboss/infinispan/&lt;cacheContainerName&gt;
</p>

@param name the name of the cache container
@param defaultCacheName the name of the default cache.  The referenced cache must be
subsequently created.

@return the request to create the cache container configuration.