-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Closed
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: bugA general bugA general bug
Milestone
Description
Vincent PERICART opened SPR-11132 and commented
When initializing 2 contexts at the same time, which both use a EhCacheFactoryBean, there is a potential race condition when :
- the same CacheManager instance is used
- both contexts have a cache with the same name
The error stack's root cause is :
Caused by: net.sf.ehcache.CacheException: Cannot replace XXX It does not equal the incumbent cache.
at net.sf.ehcache.CacheManager.replaceCacheWithDecoratedCache(CacheManager.java:1653)
at org.springframework.cache.ehcache.EhCacheFactoryBean.afterPropertiesSet(EhCacheFactoryBean.java:354)
The expected behaviour (which occurs most of the time) is that one of the contexts creates the cache, and the other one simply gets a reference to it.
Affects: 3.2.4
Metadata
Metadata
Assignees
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: bugA general bugA general bug