Example usage for org.springframework.cache.ehcache EhCacheManagerFactoryBean setCacheManagerName

List of usage examples for org.springframework.cache.ehcache EhCacheManagerFactoryBean setCacheManagerName

Introduction

In this page you can find the example usage for org.springframework.cache.ehcache EhCacheManagerFactoryBean setCacheManagerName.

Prototype

public void setCacheManagerName(String cacheManagerName) 

Source Link

Document

Set the name of the EhCache CacheManager (if a specific name is desired).

Usage

From source file:org.obiba.mica.config.CacheConfiguration.java

@Bean
public EhCacheManagerFactoryBean cacheManagerFactory() {
    log.debug("Starting Ehcache");
    EhCacheManagerFactoryBean factoryBean = new EhCacheManagerFactoryBean();
    factoryBean.setCacheManagerName("mica");

    return factoryBean;
}

From source file:com.github.lanimall.ehcache2.AppConfig.java

@Bean
public FactoryBean<net.sf.ehcache.CacheManager> cacheManager() {
    EhCacheManagerFactoryBean bean = getEhCacheManagerFactory();
    bean.setCacheManagerName("cachetest-nativeehcache");
    return bean;//  w  ww  .  j a va 2  s  .  co  m
}

From source file:com.github.lanimall.ehcache2.AppConfig.java

@Bean
public EhCacheManagerFactoryBean getEhCacheManagerFactory() {
    String ehcacheConfigPath = System.getProperty("ehcache.config.path", "classpath:ehcache.xml");
    EhCacheManagerFactoryBean bean = new EhCacheManagerFactoryBean();
    bean.setConfigLocation(resourceLoader.getResource(ehcacheConfigPath));
    bean.setCacheManagerName("cachetest-springcacheable");
    bean.setShared(true);/*from  www.  j a  v  a  2  s.c  o  m*/
    return bean;
}