manager.defineConfiguration(regionName, templateCacheName, regionCacheCfg);
definedConfigurations.add(regionName);
}
AdvancedCache cache = manager.getCache(regionName).getAdvancedCache();
if (!cache.getStatus().allowInvocations()) {
cache.start();
}
ComponentRegistry cr = cache.getComponentRegistry();
cr.getComponent(CacheCommandInitializer.class).setRegionFactory(this);
GlobalComponentRegistry globalCr = cache.getComponentRegistry().getGlobalComponentRegistry();
// TODO: This is a hack, make it easier to retrieve in Infinispan!