@ -321,6 +321,7 @@ public class EhCacheFactoryBean implements FactoryBean<Ehcache>, BeanNameAware,
@@ -321,6 +321,7 @@ public class EhCacheFactoryBean implements FactoryBean<Ehcache>, BeanNameAware,
logger.debug("Using existing EhCache cache region '"+this.cacheName+"'");
@ -339,6 +340,12 @@ public class EhCacheFactoryBean implements FactoryBean<Ehcache>, BeanNameAware,
@@ -339,6 +340,12 @@ public class EhCacheFactoryBean implements FactoryBean<Ehcache>, BeanNameAware,
// Needs to happen after listener registration but before setStatisticsEnabled
if(!cacheExists){
this.cacheManager.addCache(rawCache);
}
if(this.statisticsEnabled){
rawCache.setStatisticsEnabled(true);
}
@ -349,9 +356,6 @@ public class EhCacheFactoryBean implements FactoryBean<Ehcache>, BeanNameAware,
@@ -349,9 +356,6 @@ public class EhCacheFactoryBean implements FactoryBean<Ehcache>, BeanNameAware,