diff --git a/source/java/org/alfresco/repo/dictionary/TestModel.java b/source/java/org/alfresco/repo/dictionary/TestModel.java index 5eeab22062..f8c7211dc5 100644 --- a/source/java/org/alfresco/repo/dictionary/TestModel.java +++ b/source/java/org/alfresco/repo/dictionary/TestModel.java @@ -21,10 +21,8 @@ package org.alfresco.repo.dictionary; import java.util.ArrayList; import java.util.List; -import net.sf.ehcache.Cache; -import net.sf.ehcache.CacheManager; - -import org.alfresco.repo.cache.EhCacheAdapter; +import org.alfresco.repo.cache.DefaultSimpleCache; +import org.alfresco.repo.cache.SimpleCache; import org.alfresco.repo.dictionary.DictionaryDAOImpl.DictionaryRegistry; import org.alfresco.repo.dictionary.NamespaceDAOImpl.NamespaceRegistry; import org.alfresco.repo.tenant.SingleTServiceImpl; @@ -120,25 +118,13 @@ public class TestModel private static void initDictionaryCaches(DictionaryDAOImpl dictionaryDAO) { - CacheManager cacheManager = new CacheManager(); - - Cache dictionaryEhCache = new Cache("dictionaryCache", 50, false, true, 0L, 0L); - cacheManager.addCache(dictionaryEhCache); - EhCacheAdapter dictionaryCache = new EhCacheAdapter(); - dictionaryCache.setCache(dictionaryEhCache); - + SimpleCache dictionaryCache = new DefaultSimpleCache(); dictionaryDAO.setDictionaryRegistryCache(dictionaryCache); } private static void initNamespaceCaches(NamespaceDAOImpl namespaceDAO) { - CacheManager cacheManager = new CacheManager(); - - Cache namespaceEhCache = new Cache("namespaceCache", 50, false, true, 0L, 0L); - cacheManager.addCache(namespaceEhCache); - EhCacheAdapter namespaceCache = new EhCacheAdapter(); - namespaceCache.setCache(namespaceEhCache); - + SimpleCache namespaceCache = new DefaultSimpleCache(); namespaceDAO.setNamespaceRegistryCache(namespaceCache); } } \ No newline at end of file