servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r683289 - in /servicemix/smx3/branches/servicemix-3.2: ./ deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/ deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/
Date Wed, 06 Aug 2008 15:05:54 GMT
Author: ffang
Date: Wed Aug  6 08:05:54 2008
New Revision: 683289

URL: http://svn.apache.org/viewvc?rev=683289&view=rev
Log:
[SM-1501]ServiceMix 3.2 should change the Jetty HttpClient from blocking mode to Non blocking
(similar to 3.3 trunk version)

Modified:
    servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpComponent.java
    servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/HttpProviderEndpoint.java
    servicemix/smx3/branches/servicemix-3.2/pom.xml

Modified: servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpComponent.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpComponent.java?rev=683289&r1=683288&r2=683289&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpComponent.java
(original)
+++ servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpComponent.java
Wed Aug  6 08:05:54 2008
@@ -168,6 +168,9 @@
         BoundedThreadPool btp = new BoundedThreadPool();
         btp.setMaxThreads(comp.getConfiguration().getJettyClientThreadPoolSize());
         tempClient.setThreadPool(btp);
+        tempClient.setConnectorType(
+                org.mortbay.jetty.client.HttpClient.CONNECTOR_SELECT_CHANNEL);
+
         tempClient.start();
         return tempClient;
     }

Modified: servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/HttpProviderEndpoint.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/HttpProviderEndpoint.java?rev=683289&r1=683288&r2=683289&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/HttpProviderEndpoint.java
(original)
+++ servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/HttpProviderEndpoint.java
Wed Aug  6 08:05:54 2008
@@ -128,6 +128,21 @@
             throw (IOException) new IOException(e.getMessage()).initCause(e);
         }
     }
+    
+    protected void handleConnectionFailed(Throwable throwable, MessageExchange exchange)
{
+        try {
+            Exception e;
+            if (throwable instanceof Exception) {
+                e = (Exception) throwable;
+            } else {
+                e = new Exception(throwable);
+            }
+            exchange.setError(e);
+            send(exchange);
+        } catch (Exception e) {
+            logger.warn("Unable to send back exchange in error", e);
+        }
+    }
 
     protected org.mortbay.jetty.client.HttpClient getConnectionPool() throws Exception {
         if (jettyClient == null) {
@@ -152,8 +167,12 @@
             handle(this, jbiExchange);
         }
         protected void onException(Throwable throwable) {
+            throwable.printStackTrace();
             throw new RuntimeException(throwable);
         }
+        protected void onConnectionFailed(Throwable throwable) {
+            handleConnectionFailed(throwable, jbiExchange);
+        }
     }
 
     public int getClientSoTimeout() {

Modified: servicemix/smx3/branches/servicemix-3.2/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/pom.xml?rev=683289&r1=683288&r2=683289&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/pom.xml (original)
+++ servicemix/smx3/branches/servicemix-3.2/pom.xml Wed Aug  6 08:05:54 2008
@@ -209,7 +209,7 @@
         <backport-util-concurrent-version>2.2</backport-util-concurrent-version>
         <camel-version>1.4.0</camel-version>
         <jencks-version>2.1</jencks-version>
-        <jetty-version>6.1.6</jetty-version>
+        <jetty-version>6.1.11</jetty-version>
         <geronimo-version>2.0.1</geronimo-version>
         <servicemix-version>3.2.3-SNAPSHOT</servicemix-version>
         <wsdl4j-version>1.6.1</wsdl4j-version>



Mime
View raw message