Author: gnodet
Date: Tue Jun 17 03:13:14 2008
New Revision: 668601

URL: http://svn.apache.org/viewvc?rev=668601&view=rev
Log:
SM-1406: Add a configurable timeout on <http:provider/> endpoint

Modified:
    
servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/HttpProviderEndpoint.java

Modified: 
servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/HttpProviderEndpoint.java
URL: 
http://svn.apache.org/viewvc/servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/HttpProviderEndpoint.java?rev=668601&r1=668600&r2=668601&view=diff
==============================================================================
--- 
servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/HttpProviderEndpoint.java
 (original)
+++ 
servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/HttpProviderEndpoint.java
 Tue Jun 17 03:13:14 2008
@@ -44,6 +44,7 @@
     //private BasicAuthCredentials basicAuthentication;
     private HttpProviderMarshaler marshaler;
     private String locationURI;
+    private int clientSoTimeout = 60000;
     
     public HttpProviderEndpoint() {
         super();
@@ -136,7 +137,9 @@
 
     protected org.mortbay.jetty.client.HttpClient getConnectionPool() {
         HttpComponent comp =  (HttpComponent) getServiceUnit().getComponent();
-        return comp.getConnectionPool();
+        org.mortbay.jetty.client.HttpClient client = comp.getConnectionPool();
+        client.setSoTimeout(getClientSoTimeout());  
+        return client;
     }
     
     protected class Exchange extends SmxHttpExchange {
@@ -149,4 +152,12 @@
         }
     }
 
+    public int getClientSoTimeout() { 
+        return clientSoTimeout; 
+    } 
+
+    public void setClientSoTimeout(int clientTimeout) { 
+        this.clientSoTimeout = clientTimeout; 
+    } 
+
 }


Reply via email to