private Map<CacheCategory, CacheService> createCaches(CacheInfo cacheInfo) {
Map<CacheCategory, CacheService> ciCaches = new HashMap<CacheCategory, CacheService>();
for (Map.Entry<CacheCategory, InfinispanConfiguration> entry : cacheInfo.getConfiguration().entrySet()) {
CacheService cacheService;
CacheCategory category = entry.getKey();
InfinispanConfiguration config = entry.getValue();
if (config.isCacheEnabled()) {
String configurationName = config.getConfigurationName();
if (null == configurationName) {
Configuration infinispan;
infinispan = manager.getDefaultConfiguration().clone();
infinispan.applyOverrides(config.getInfinispanConfiguration());
configurationName = "$" + category.getName() + "$" + cacheInfo.getId();
manager.defineConfiguration(configurationName, infinispan);
}
recorder.record("infinispan", "configuration name " + configurationName);
cacheService = new InfinispanCacheService(manager.<String, Object>getCache(configurationName));