Example usage for org.springframework.cache.ehcache EhCacheCacheManager EhCacheCacheManager

List of usage examples for org.springframework.cache.ehcache EhCacheCacheManager EhCacheCacheManager

Introduction

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

Prototype

public EhCacheCacheManager(net.sf.ehcache.CacheManager cacheManager) 

Source Link

Document

Create a new EhCacheCacheManager for the given backing EhCache CacheManager.

Usage

From source file:org.finra.dm.dao.config.DaoSpringModuleConfig.java

@Bean
@Override
public CacheManager cacheManager() {
    return new EhCacheCacheManager(ehCacheManager());
}

From source file:org.obiba.opal.core.runtime.DefaultOpalRuntime.java

private void initMagmaEngine() {
    try {//ww  w.ja  va2s  .  co  m
        Runnable magmaEngineInit = new Runnable() {
            @Override
            public void run() {
                // This needs to be added BEFORE otherwise bad things happen. That really sucks.
                MagmaEngine.get().addDecorator(viewManager);
                MagmaEngineFactory magmaEngineFactory = opalConfigurationService.getOpalConfiguration()
                        .getMagmaEngineFactory();

                for (MagmaEngineExtension extension : magmaEngineFactory.extensions()) {
                    MagmaEngine.get().extend(extension);
                }
                MagmaEngine.get().extend(new MagmaCacheExtension(new EhCacheCacheManager(cacheManager)));
            }
        };
        new TransactionalThread(transactionTemplate, magmaEngineInit).start();
    } catch (RuntimeException e) {
        log.error("Could not create MagmaEngine.", e);
    }
}