Class ContextAwareEhCacheManagerFactoryBean

java.lang.Object
org.springframework.cache.ehcache.EhCacheManagerFactoryBean
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

    Fields inherited from interface org.springframework.beans.factory.FactoryBean

    OBJECT_TYPE_ATTRIBUTE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
     

    Methods inherited from class org.springframework.cache.ehcache.EhCacheManagerFactoryBean

    afterPropertiesSet, destroy, getObject, getObjectType, isSingleton, setAcceptExisting, setCacheManagerName, setConfigLocation, setShared

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ContextAwareEhCacheManagerFactoryBean

      public ContextAwareEhCacheManagerFactoryBean()
  • Method Details

    • 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