- All Implemented Interfaces:
- org.springframework.beans.factory.Aware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.FactoryBean<net.sf.ehcache.CacheManager>, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware
public class ContextAwareEhCacheManagerFactoryBean
extends org.springframework.cache.ehcache.EhCacheManagerFactoryBean
implements org.springframework.context.ApplicationContextAware
Factory bean for EhCacheManagers that name CacheManager
s after
the Id of the application context in which they are instantiated.
This factory makes it possible to re-use the same Spring bean files to instantiate multiple concurrent
application contexts without sharing the instance of CacheManager
.
Calling EhCacheManagerFactoryBean.setCacheManagerName(String)
or setting EhCacheManagerFactoryBean.setShared(boolean)
to true defeat
the purpose of this factory bean.