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

77193: Merged PLATFORM1 (5.0/Cloud) to HEAD-BUG-FIX (5.0/Cloud)
      74588: Revert of R 74318 ACE-1996


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@78049 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Mark Rogers
2014-07-23 16:24:56 +00:00
parent eaf4f69cdd
commit d9271fc8e8
8 changed files with 54 additions and 100 deletions

View File

@@ -113,18 +113,20 @@ public class DictionaryLoadDAOTest
private void initDictionaryCaches(DictionaryDAOImpl dictionaryDAO, TenantService tenantService) throws Exception
{
CompiledModelsCache compiledModelsCache = new CompiledModelsCache();
compiledModelsCache.setDictionaryDAO(dictionaryDAO);
compiledModelsCache.setTenantService(tenantService);
compiledModelsCache.setRegistry(new DefaultAsynchronouslyRefreshedCacheRegistry());
TraceableThreadFactory threadFactory = new TraceableThreadFactory();
threadFactory.setThreadDaemon(true);
threadFactory.setThreadPriority(Thread.NORM_PRIORITY);
dictionaryDAO.setDictionaryRegistryCache(new MemoryCache<String, DictionaryRegistry>());
ThreadPoolExecutor threadPoolExecutor = new DynamicallySizedThreadPoolExecutor(20, 20, 90, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(), threadFactory,
new ThreadPoolExecutor.CallerRunsPolicy());
compiledModelsCache.setThreadPoolExecutor(threadPoolExecutor);
dictionaryDAO.setDictionaryRegistryCache(compiledModelsCache);
// CompiledModelsCache compiledModelsCache = new CompiledModelsCache();
// compiledModelsCache.setDictionaryDAO(dictionaryDAO);
// compiledModelsCache.setTenantService(tenantService);
// compiledModelsCache.setRegistry(new DefaultAsynchronouslyRefreshedCacheRegistry());
// TraceableThreadFactory threadFactory = new TraceableThreadFactory();
// threadFactory.setThreadDaemon(true);
// threadFactory.setThreadPriority(Thread.NORM_PRIORITY);
//
// ThreadPoolExecutor threadPoolExecutor = new DynamicallySizedThreadPoolExecutor(20, 20, 90, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(), threadFactory,
// new ThreadPoolExecutor.CallerRunsPolicy());
// compiledModelsCache.setThreadPoolExecutor(threadPoolExecutor);
// dictionaryDAO.setDictionaryRegistryCache(compiledModelsCache);
dictionaryDAO.init();
}