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

77245: Merged PLATFORM1 (5.0/Cloud) to HEAD-BUG-FIX (5.0/Cloud)
      76227: Merged DEV to PLATFORM1 with corrections
         75545: ACE-1996: Cluster: Web client extensions not distributed:
            - Remove initial title/description resolving in CMIS dictionaries
            - Use asynchronously refreshed cache in diactionaryDAO
            - Modify unit tests that uses CompiledModelCache 
            - Make sure that rootNode exists before children retrieving in DictionaryRepositoryBootstrap.getNodes()


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@78101 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Mark Rogers
2014-07-23 16:50:06 +00:00
parent d16f78b9b2
commit 1edab772b1
10 changed files with 106 additions and 58 deletions

View File

@@ -113,20 +113,18 @@ public class DictionaryLoadDAOTest
private void initDictionaryCaches(DictionaryDAOImpl dictionaryDAO, TenantService tenantService) throws Exception
{
dictionaryDAO.setDictionaryRegistryCache(new MemoryCache<String, DictionaryRegistry>());
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);
// 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);
ThreadPoolExecutor threadPoolExecutor = new DynamicallySizedThreadPoolExecutor(20, 20, 90, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(), threadFactory,
new ThreadPoolExecutor.CallerRunsPolicy());
compiledModelsCache.setThreadPoolExecutor(threadPoolExecutor);
dictionaryDAO.setDictionaryRegistryCache(compiledModelsCache);
dictionaryDAO.init();
}