camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r1185096 - in /camel/trunk: components/camel-jetty/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java parent/pom.xml
Date Mon, 17 Oct 2011 10:33:46 GMT
Author: ningjiang
Date: Mon Oct 17 10:33:46 2011
New Revision: 1185096

URL: http://svn.apache.org/viewvc?rev=1185096&view=rev
Log:
CAMEL-4544 upgraded jetty to 7.5.3

Modified:
    camel/trunk/components/camel-jetty/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java
    camel/trunk/parent/pom.xml

Modified: camel/trunk/components/camel-jetty/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jetty/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java?rev=1185096&r1=1185095&r2=1185096&view=diff
==============================================================================
--- camel/trunk/components/camel-jetty/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java
(original)
+++ camel/trunk/components/camel-jetty/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java
Mon Oct 17 10:33:46 2011
@@ -17,6 +17,8 @@
 package org.apache.camel.component.jetty;
 
 import java.io.File;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
 import java.net.URI;
 import java.util.HashMap;
 import java.util.List;
@@ -494,14 +496,19 @@ public class JettyHttpComponent extends 
                  * we short-circuit it here to just let things go when the context is already
                  * provided.
                  */
-                @Override
+                // This method is for Jetty 7.0.x ~ 7.4.x
+                @SuppressWarnings("unused")
                 public boolean checkConfig() {
                     if (getSslContext() == null) {
-                        return super.checkConfig();
+                        return checkSSLContextFactoryConfig(this);
                     } else {
                         return true;
                     }
                 }
+                // This method is for Jetty 7.5.x
+                public void checkKeyStore() {
+                    // here we don't check the SslContext as it is already created
+                }
                 
             };
             contextFact.setSslContext(endpointSslContextParameters.createSSLContext());
@@ -553,6 +560,22 @@ public class JettyHttpComponent extends 
         }
         return answer;
     }
+    
+    protected boolean checkSSLContextFactoryConfig(SslContextFactory instance) {
+        try {
+            Method method = SslContextFactory.class.getMethod("checkConfig");
+            return (Boolean)method.invoke(instance);
+        } catch (NoSuchMethodException ex) {
+            // ignore
+        } catch (IllegalArgumentException e) {
+            // ignore
+        } catch (IllegalAccessException e) {
+            // ignore
+        } catch (InvocationTargetException e) {
+            // ignore
+        }
+        return false;
+    }
 
     public Map<Integer, SslSelectChannelConnector> getSslSocketConnectors() {
         return sslSocketConnectors;

Modified: camel/trunk/parent/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/parent/pom.xml?rev=1185096&r1=1185095&r2=1185096&view=diff
==============================================================================
--- camel/trunk/parent/pom.xml (original)
+++ camel/trunk/parent/pom.xml Mon Oct 17 10:33:46 2011
@@ -104,7 +104,7 @@
     <jclouds-version>1.1.1</jclouds-version>
     <jclouds-feature-version>1.1.1-SNAPSHOT</jclouds-feature-version>
     <jdom-version>1.1</jdom-version>
-    <jetty-version>7.4.5.v20110725</jetty-version>
+    <jetty-version>7.5.3.v20111011</jetty-version>
     <jettison-version>1.3</jettison-version>
     <jexcelapi-version>2.4.2</jexcelapi-version>
     <jibx-version>1.2.2</jibx-version>



Mime
View raw message