com.atlassian.crowd.acceptance.utils
Class ContextAwareEhCacheManagerFactoryBean

java.lang.Object
  extended by org.springframework.cache.ehcache.EhCacheManagerFactoryBean
      extended by com.atlassian.crowd.acceptance.utils.ContextAwareEhCacheManagerFactoryBean
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 CacheManagers 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.


Field Summary
 
Fields inherited from class org.springframework.cache.ehcache.EhCacheManagerFactoryBean
logger
 
Constructor Summary
ContextAwareEhCacheManagerFactoryBean()
           
 
Method Summary
 void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
           
 
Methods inherited from class org.springframework.cache.ehcache.EhCacheManagerFactoryBean
afterPropertiesSet, destroy, getObject, getObjectType, isSingleton, setCacheManagerName, setConfigLocation, setShared
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContextAwareEhCacheManagerFactoryBean

public ContextAwareEhCacheManagerFactoryBean()
Method Detail

setApplicationContext

public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
                           throws org.springframework.beans.BeansException
Specified by:
setApplicationContext in interface org.springframework.context.ApplicationContextAware
Throws:
org.springframework.beans.BeansException


Copyright © 2013 Atlassian. All Rights Reserved.