Merged HEAD-BUG-FIX (4.3/Cloud) to HEAD (4.3/Cloud)

69953: Merged V4.2-BUG-FIX (4.2.3) to HEAD-BUG-FIX (4.3/Cloud)
      69919: Fix build error related to the following merge.
         << Forgot to make sure the new file had the changes that were only in V4.2-BUG-FIX >>
         Merged V4.1-BUG-FIX (4.1.9) to V4.2-BUG-FIX (4.2.3)
            69831: MNT-11192: TestModel.java removed from alfresco-repository-xxx.jar
                - moved TestModel.java back from **/test-java/** to **/java/**


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@70469 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2014-05-16 20:13:49 +00:00
parent 9526c89138
commit 54e1dc2a66

View File

@@ -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<String, DictionaryRegistry> dictionaryCache = new EhCacheAdapter<String, DictionaryRegistry>();
dictionaryCache.setCache(dictionaryEhCache);
SimpleCache<String, DictionaryRegistry> dictionaryCache = new DefaultSimpleCache<String, DictionaryRegistry>();
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<String, NamespaceRegistry> namespaceCache = new EhCacheAdapter<String, NamespaceRegistry>();
namespaceCache.setCache(namespaceEhCache);
SimpleCache<String, NamespaceRegistry> namespaceCache = new DefaultSimpleCache<String, NamespaceRegistry>();
namespaceDAO.setNamespaceRegistryCache(namespaceCache);
}
}