// factory.setProperties("monitorAddress=localhost, monitorPort=9889, memoryMeasurement=true");
// factory.setPropertySeparator(",");
// configuration.addCacheManagerPeerListenerFactory(factory);
// Configuration is required for EHCache CacheManager
Configuration ehCacheManagerConfiguration = new Configuration();
DiskStoreConfiguration diskStoreConfiguration = new DiskStoreConfiguration();
if (diskPath != null) {
diskStoreConfiguration.setPath(diskPath);
}
// use the ehCacheConfiguration as default but change the name
ehCacheConfiguration.setName(SCCacheFactory.DEFAULT_CACHE_NAME);
ehCacheManagerConfiguration.addDiskStore(diskStoreConfiguration);
ehCacheManagerConfiguration.setName(SCCacheFactory.DEFAULT_CACHE_NAME);
ehCacheManagerConfiguration.setDefaultCacheConfiguration(ehCacheConfiguration);
ehCacheManagerConfiguration.setUpdateCheck(false); // disable update checker (checks EHCache version)
ehManager = new CacheManager(ehCacheManagerConfiguration);
}
ehManager.addCache(cacheData.getEhCache()); // adds the cache to the EHCache CacheManager
return cacheData;
}