public Object createObjectCache(String reference) {
        final String methodName = "createCacheInstance()";

        if (tc.isEntryEnabled())
            Tr.entry(tc, methodName + " cacheName=" + reference);

        CacheConfig config = ServerCache.getCacheService().getCacheInstanceConfig(reference);

        if (config == null) {
            // DYNA1004E=DYNA1004E: WebSphere Dynamic Cache instance named {0} can not be initialized because it is not
            // configured.
            // DYNA1004E.explanation=This message indicates the named WebSphere Dynamic Cache instance can not be
            // initialized. The named instance is not avaliable.
            // DYNA1004E.useraction=Use the WebSphere Administrative Console to configure a cache instance resource
            // named {0}.
            Tr.error(tc, "DYNA1004E", new Object[] { reference });
        }

        /*
         * Sync on the WCCMConfig because multiple cache readers might have entered the createCacheInstance at the same
         * time. With this sync one reader has to wait till the other has finished creating the cache instance
         */
        DistributedObjectCache dCache = null;
        synchronized (config) { // ADDED FOR 378973
            if (tc.isDebugEnabled()) {
                Tr.debug(tc, "Entered synchronized (config) for " + config.getCacheName());
            }

            dCache = config.getDistributedObjectCache();
            if (dCache == null) {
                dCache = createDistributedObjectCache(config);
                config.setDistributedObjectCache(dCache);
            }
        }
        if (tc.isDebugEnabled()) {
            Tr.debug(tc, methodName + " cacheName in=" + reference + " out=" + reference);
        }

        if (tc.isEntryEnabled())
            Tr.exit(tc, methodName + "  distributedObjectCache=" + dCache);
        return dCache;
    }
public Object createObjectCache ( String reference ) { final String methodName = "createCacheInstance()" ; if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , methodName + " cacheName=" + reference ) ; CacheConfig config = ServerCache . getCacheService ( ) . getCacheInstanceConfig ( reference ) ; if ( config == null ) { Tr . error ( tc , "DYNA1004E" , new Object [ ] { reference } ) ; } DistributedObjectCache dCache = null ; synchronized ( config ) { if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Entered synchronized (config) for " + config . getCacheName ( ) ) ; } dCache = config . getDistributedObjectCache ( ) ; if ( dCache == null ) { dCache = createDistributedObjectCache ( config ) ; config . setDistributedObjectCache ( dCache ) ; } } if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , methodName + " cacheName in=" + reference + " out=" + reference ) ; } if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , methodName + "  distributedObjectCache=" + dCache ) ; return dCache ; }
Create a DistributedObjectCache from a string reference. The config for the reference must already exist.

@param reference
@return The returned object can be type cast to DistributedObjectCache and will be a DistributedMap,
DistributedLockingMap or DistributedNioMap.