Set read timeout for services to infinite
authorCherian Mathew <c.mathew@bgbm.org>
Mon, 7 Sep 2015 10:25:22 +0000 (12:25 +0200)
committerCherian Mathew <c.mathew@bgbm.org>
Mon, 7 Sep 2015 10:25:22 +0000 (12:25 +0200)
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/CdmApplicationRemoteConfiguration.java

index f7c1b957c4e6825fb76bc8500153e79f2a4b50b5..23e530215a921fd0d6511def12e4912837fd17d0 100644 (file)
@@ -20,7 +20,6 @@ import org.springframework.beans.BeansException;
 import org.springframework.context.ApplicationContext;\r
 import org.springframework.context.ApplicationContextAware;\r
 import org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean;\r
-import org.springframework.remoting.httpinvoker.HttpInvokerRequestExecutor;\r
 import org.springframework.security.access.AccessDecisionVoter;\r
 import org.springframework.security.authentication.AuthenticationProvider;\r
 import org.springframework.security.authentication.ProviderManager;\r
@@ -123,7 +122,7 @@ public class CdmApplicationRemoteConfiguration implements ICdmApplicationConfigu
         this.remoteSource = remoteSource;\r
     }\r
 \r
-    private Object getService(Class<?> clazz, String serviceSuffix, HttpInvokerRequestExecutor executor) {\r
+    private Object getService(Class<?> clazz, String serviceSuffix, CdmServiceRequestExecutor executor) {\r
         if(serviceMap.containsKey(clazz)) {\r
             return serviceMap.get(clazz);\r
         }\r
@@ -137,6 +136,7 @@ public class CdmApplicationRemoteConfiguration implements ICdmApplicationConfigu
         proxy.setServiceInterface(clazz);\r
         proxy.setServiceUrl(baseUrl + serviceSuffix);\r
         if(executor != null) {\r
+            executor.setReadTimeout(0);\r
             proxy.setHttpInvokerRequestExecutor(executor);\r
         }\r
         proxy.afterPropertiesSet();\r