Skip to content
Snippets Groups Projects
Commit 29e7b353 authored by felmer's avatar felmer
Browse files

SSDM-8600: keep original non-default executor for MonitoringProxy (has been...

SSDM-8600: keep original non-default executor for MonitoringProxy (has been removed by accident in the previous check-in)
parent d39e5b86
No related branches found
No related tags found
No related merge requests found
......@@ -20,12 +20,14 @@ import static ch.systemsx.cisd.openbis.generic.shared.basic.GenericSharedConstan
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ExecutorService;
import org.apache.commons.lang3.time.DateUtils;
import org.apache.log4j.Logger;
import org.springframework.remoting.RemoteAccessException;
import ch.systemsx.cisd.base.exceptions.CheckedExceptionTunnel;
import ch.systemsx.cisd.base.namedthread.NamingThreadPoolExecutor;
import ch.systemsx.cisd.common.concurrent.MonitoringProxy;
import ch.systemsx.cisd.common.logging.Log4jSimpleLogger;
import ch.systemsx.cisd.common.logging.LogCategory;
......@@ -42,12 +44,17 @@ import ch.systemsx.cisd.openbis.generic.shared.IDataStoreService;
*/
public class DataStoreServiceFactory implements IDataStoreServiceFactory
{
private final static int NUMBER_OF_CORE_THREADS = 10;
private final Map<String, IDataStoreService> services =
new HashMap<String, IDataStoreService>();
private final static Logger machineLog = LogFactory.getLogger(LogCategory.MACHINE,
IDataStoreService.class);
private final static ExecutorService executorService = new NamingThreadPoolExecutor(
"Monitoring Proxy").corePoolSize(NUMBER_OF_CORE_THREADS).daemonize();
@Override
public IDataStoreService create(String serverURL)
{
......@@ -80,6 +87,7 @@ public class DataStoreServiceFactory implements IDataStoreServiceFactory
.logLevelForNotSuccessfulCalls(LogLevel.WARN)
.timing(TimingParameters.create(-1L, 5, DateUtils.MILLIS_PER_MINUTE))
.exceptionClassSuitableForRetrying(RemoteAccessException.class)
.executorService(executorService)
.get();
} catch (SecurityException ex)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment