Hurelhuyag opened SPR-15619 and commented
If I use CacheManager.newInstance instead of new CacheManager I can share same cacheManager for spring method cache and hibernate cache.
Something like this.
if (this.acceptExisting) {
// EhCache 2.5+: Reusing an existing CacheManager of the same name.
// Basically the same code as in CacheManager.getInstance(String),
// just storing whether we're dealing with an existing instance.
synchronized (CacheManager.class) {
this.cacheManager = CacheManager.getCacheManager(this.cacheManagerName);
if (this.cacheManager == null) {
this.cacheManager = CacheManager.newInstance(configuration);
}
else {
this.locallyManaged = false;
}
}
}
Affects: 4.3.7
Issue Links: - #20180 Use ehcache.xml configuration defined name for CacheManager lookup.
Comment From: spring-projects-issues
Jens Wilke commented
This relates to EHCache only. Please add EHCache to the issue title.
Comment From: snicoll
Sorry for overlooking this. In the meantime our support for EhCache has been removed from the core framework.