@Configuration public class Cfg { public ExecutorService executorService() { return executorServiceFactoryBean().getObject(); } @Bean public ThreadPoolExecutorFactoryBean executorServiceFactoryBean() { return new ThreadPoolExecutorFactoryBean(); } }
private static void initDictionaryCaches(DictionaryDAOImpl dictionaryDAO, TenantService tenantService) throws Exception { CompiledModelsCache compiledModelsCache = new CompiledModelsCache(); compiledModelsCache.setDictionaryDAO(dictionaryDAO); compiledModelsCache.setTenantService(tenantService); compiledModelsCache.setRegistry(new DefaultAsynchronouslyRefreshedCacheRegistry()); ThreadPoolExecutorFactoryBean threadPoolfactory = new ThreadPoolExecutorFactoryBean(); threadPoolfactory.afterPropertiesSet(); compiledModelsCache.setThreadPoolExecutor((ThreadPoolExecutor) threadPoolfactory.getObject()); dictionaryDAO.setDictionaryRegistryCache(compiledModelsCache); dictionaryDAO.init(); } }
private static void initDictionaryCaches(DictionaryDAOImpl dictionaryDAO, TenantService tenantService) throws Exception { CompiledModelsCache compiledModelsCache = new CompiledModelsCache(); compiledModelsCache.setDictionaryDAO(dictionaryDAO); compiledModelsCache.setTenantService(tenantService); compiledModelsCache.setRegistry(new DefaultAsynchronouslyRefreshedCacheRegistry()); ThreadPoolExecutorFactoryBean threadPoolfactory = new ThreadPoolExecutorFactoryBean(); threadPoolfactory.afterPropertiesSet(); compiledModelsCache.setThreadPoolExecutor((ThreadPoolExecutor) threadPoolfactory.getObject()); dictionaryDAO.setDictionaryRegistryCache(compiledModelsCache); dictionaryDAO.init(); } }
private void initDictionaryCaches(DictionaryDAOImpl dictionaryDAO, TenantService tenantService) throws Exception { CompiledModelsCache compiledModelsCache = new CompiledModelsCache(); compiledModelsCache.setDictionaryDAO(dictionaryDAO); compiledModelsCache.setTenantService(tenantService); compiledModelsCache.setRegistry(new DefaultAsynchronouslyRefreshedCacheRegistry()); ThreadPoolExecutorFactoryBean threadPoolfactory = new ThreadPoolExecutorFactoryBean(); threadPoolfactory.afterPropertiesSet(); compiledModelsCache.setThreadPoolExecutor((ThreadPoolExecutor) threadPoolfactory.getObject()); dictionaryDAO.setDictionaryRegistryCache(compiledModelsCache); dictionaryDAO.init(); }
private void initDictionaryCaches(DictionaryDAOImpl dictionaryDAO, TenantService tenantService) throws Exception { CompiledModelsCache compiledModelsCache = new CompiledModelsCache(); compiledModelsCache.setDictionaryDAO(dictionaryDAO); compiledModelsCache.setTenantService(tenantService); compiledModelsCache.setRegistry(new DefaultAsynchronouslyRefreshedCacheRegistry()); ThreadPoolExecutorFactoryBean threadPoolfactory = new ThreadPoolExecutorFactoryBean(); threadPoolfactory.afterPropertiesSet(); compiledModelsCache.setThreadPoolExecutor((ThreadPoolExecutor) threadPoolfactory.getObject()); dictionaryDAO.setDictionaryRegistryCache(compiledModelsCache); dictionaryDAO.init(); }
@SuppressWarnings("unchecked") private void initDictionaryCaches(DictionaryDAOImpl dictionaryDAO, TenantService tenantService) throws Exception { CompiledModelsCache compiledModelsCache = new CompiledModelsCache(); compiledModelsCache.setDictionaryDAO(dictionaryDAO); compiledModelsCache.setTenantService(tenantService); compiledModelsCache.setRegistry(new DefaultAsynchronouslyRefreshedCacheRegistry()); ThreadPoolExecutorFactoryBean threadPoolfactory = new ThreadPoolExecutorFactoryBean(); threadPoolfactory.afterPropertiesSet(); compiledModelsCache.setThreadPoolExecutor((ThreadPoolExecutor) threadPoolfactory.getObject()); dictionaryDAO.setDictionaryRegistryCache(compiledModelsCache); dictionaryDAO.init(); }
@SuppressWarnings("unchecked") private void initDictionaryCaches(DictionaryDAOImpl dictionaryDAO, TenantService tenantService) throws Exception { CompiledModelsCache compiledModelsCache = new CompiledModelsCache(); compiledModelsCache.setDictionaryDAO(dictionaryDAO); compiledModelsCache.setTenantService(tenantService); compiledModelsCache.setRegistry(new DefaultAsynchronouslyRefreshedCacheRegistry()); ThreadPoolExecutorFactoryBean threadPoolfactory = new ThreadPoolExecutorFactoryBean(); threadPoolfactory.afterPropertiesSet(); compiledModelsCache.setThreadPoolExecutor((ThreadPoolExecutor) threadPoolfactory.getObject()); dictionaryDAO.setDictionaryRegistryCache(compiledModelsCache); dictionaryDAO.init(); }