You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2016/05/05 06:50:51 UTC

camel git commit: Upgrade to jetty 9.3.

Repository: camel
Updated Branches:
  refs/heads/jetty93 [created] 642843b88


Upgrade to jetty 9.3.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/642843b8
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/642843b8
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/642843b8

Branch: refs/heads/jetty93
Commit: 642843b884f79ca3d8c85253181fd4e6b434618b
Parents: 2e3a204
Author: Claus Ibsen <da...@apache.org>
Authored: Thu May 5 08:07:09 2016 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Thu May 5 08:07:09 2016 +0200

----------------------------------------------------------------------
 components/camel-cometd/pom.xml                 |  2 +-
 .../camel/component/cometd/CometdComponent.java |  2 +-
 components/camel-jms/src/main/docs/jms.adoc     |  6 ++-
 .../salesforce/SalesforceHttpClient.java        | 20 +++++++-
 .../client/SalesforceSecurityHandler.java       |  4 ++
 parent/pom.xml                                  | 51 +-------------------
 6 files changed, 31 insertions(+), 54 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/642843b8/components/camel-cometd/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-cometd/pom.xml b/components/camel-cometd/pom.xml
index 4c365c8..bbce294 100644
--- a/components/camel-cometd/pom.xml
+++ b/components/camel-cometd/pom.xml
@@ -33,7 +33,7 @@
         <camel.osgi.export.pkg>org.apache.camel.component.cometd.*</camel.osgi.export.pkg>
         <camel.osgi.import.pkg>
             !org.apache.camel.component.cometd.*,
-            org.eclipse.jetty.util.ssl;version="[9,9.5)";resolution:=optional,
+            org.eclipse.jetty.util.ssl;version="[9,10)";resolution:=optional,
             ${camel.osgi.import.defaults},
             *
         </camel.osgi.import.pkg>

http://git-wip-us.apache.org/repos/asf/camel/blob/642843b8/components/camel-cometd/src/main/java/org/apache/camel/component/cometd/CometdComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-cometd/src/main/java/org/apache/camel/component/cometd/CometdComponent.java b/components/camel-cometd/src/main/java/org/apache/camel/component/cometd/CometdComponent.java
index 3ff8ee0..f030b91 100644
--- a/components/camel-cometd/src/main/java/org/apache/camel/component/cometd/CometdComponent.java
+++ b/components/camel-cometd/src/main/java/org/apache/camel/component/cometd/CometdComponent.java
@@ -352,7 +352,7 @@ public class CometdComponent extends UriEndpointComponent {
      * a pre-configured {@link SSLContext}.
      */
     private static final class CometdComponentSslContextFactory extends SslContextFactory {
-        @Override
+
         public void checkKeyStore() {
         }
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/642843b8/components/camel-jms/src/main/docs/jms.adoc
----------------------------------------------------------------------
diff --git a/components/camel-jms/src/main/docs/jms.adoc b/components/camel-jms/src/main/docs/jms.adoc
index 7d68306..eb4effa 100644
--- a/components/camel-jms/src/main/docs/jms.adoc
+++ b/components/camel-jms/src/main/docs/jms.adoc
@@ -297,6 +297,7 @@ Endpoint options
 
 
 
+
 // endpoint options: START
 The JMS component supports 78 endpoint options which are listed below:
 
@@ -374,8 +375,8 @@ The JMS component supports 78 endpoint options which are listed below:
 | transferExchange | advanced | false | boolean | You can transfer the exchange over the wire instead of just the body and headers. The following fields are transferred: In body Out body Fault body In headers Out headers Fault headers exchange properties exchange exception. This requires that the objects are serializable. Camel will exclude any non-serializable objects and log it at WARN level. You must enable this option on both the producer and consumer side so Camel knows the payloads is an Exchange and not a regular payload.
 | transferFault | advanced | false | boolean | If enabled and you are using Request Reply messaging (InOut) and an Exchange failed with a SOAP fault (not exception) on the consumer side then the fault flag on link org.apache.camel.MessageisFault() will be send back in the response as a JMS header with the key link JmsConstantsJMS_TRANSFER_FAULT. If the client is Camel the returned fault flag will be set on the link org.apache.camel.MessagesetFault(boolean). You may want to enable this when using Camel components that support faults such as SOAP based such as cxf or spring-ws.
 | useMessageIDAsCorrelationID | advanced | false | boolean | Specifies whether JMSMessageID should always be used as JMSCorrelationID for InOut messages.
-| waitForProvisionCorrelationToBeUpdatedCounter | advanced | 50 | int | Sets a counter that is used in conjunction with waitForProvisionCorrelationToBeUpdatedThreadSleepingTime
-| waitForProvisionCorrelationToBeUpdatedThreadSleepingTime | advanced | 100 | long | Sets the sleeping time of the Thread when waiting for provision correlation to be updated.
+| waitForProvisionCorrelationToBeUpdatedCounter | advanced | 50 | int | Number of times to wait for provisional correlation id to be updated to the actual correlation id when doing request/reply over JMS and when the option useMessageIDAsCorrelationID is enabled.
+| waitForProvisionCorrelationToBeUpdatedThreadSleepingTime | advanced | 100 | long | Interval in millis to sleep each time while waiting for provisional correlation id to be updated.
 | transacted | transaction | false | boolean | Specifies whether to use transacted mode
 | lazyCreateTransactionManager | transaction (advanced) | true | boolean | If true Camel will create a JmsTransactionManager if there is no transactionManager injected when option transacted=true.
 | transactionManager | transaction (advanced) |  | PlatformTransactionManager | The Spring transaction manager to use.
@@ -387,6 +388,7 @@ The JMS component supports 78 endpoint options which are listed below:
 
 
 
+
 [[JMS-MessageMappingbetweenJMSandCamel]]
 Message Mapping between JMS and Camel
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

http://git-wip-us.apache.org/repos/asf/camel/blob/642843b8/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceHttpClient.java
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceHttpClient.java b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceHttpClient.java
index 6bca3f8..0ea31e9 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceHttpClient.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceHttpClient.java
@@ -16,6 +16,7 @@
  */
 package org.apache.camel.component.salesforce;
 
+import java.lang.reflect.Method;
 import java.net.URI;
 import java.util.concurrent.TimeUnit;
 
@@ -26,6 +27,8 @@ import org.eclipse.jetty.client.HttpClient;
 import org.eclipse.jetty.client.HttpClientTransport;
 import org.eclipse.jetty.client.HttpConversation;
 import org.eclipse.jetty.client.HttpRequest;
+import org.eclipse.jetty.client.ProtocolHandler;
+import org.eclipse.jetty.client.ProtocolHandlers;
 import org.eclipse.jetty.client.api.Request;
 import org.eclipse.jetty.util.ssl.SslContextFactory;
 
@@ -73,7 +76,22 @@ public class SalesforceHttpClient extends HttpClient {
         if (getSession() == null) {
             throw new IllegalStateException("Missing SalesforceSession in property session!");
         }
-        getProtocolHandlers().add(new SalesforceSecurityHandler(this));
+
+        // brilliant jetty you keep breaking your apis in 9.x - a round of golf clap for you!
+        // in 9.3 onwards its called put, and the add method is removed
+        ProtocolHandlers handlers = getProtocolHandlers();
+        Method method = null;
+        try {
+            // is there a put method?
+            method = handlers.getClass().getMethod("put", ProtocolHandler.class);
+        } catch (Throwable e) {
+            method = handlers.getClass().getMethod("add", ProtocolHandler.class);
+        }
+        if (method != null) {
+            method.invoke(handlers, new SalesforceSecurityHandler(this));
+        } else {
+            throw new IllegalStateException("You need Jetty 9.2 or better on the classpath.");
+        }
         super.doStart();
     }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/642843b8/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/SalesforceSecurityHandler.java
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/SalesforceSecurityHandler.java b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/SalesforceSecurityHandler.java
index 679cb1c..a811505 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/SalesforceSecurityHandler.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/SalesforceSecurityHandler.java
@@ -80,6 +80,10 @@ public class SalesforceSecurityHandler implements ProtocolHandler {
             && (retries == null || retries <= maxAuthenticationRetries);
     }
 
+    public String getName() {
+        return "SalesforceSecurityHandler";
+    }
+
     @Override
     public Response.Listener getResponseListener() {
         return new SecurityListener(maxContentLength);

http://git-wip-us.apache.org/repos/asf/camel/blob/642843b8/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index dabfb0e..757e68c 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -301,7 +301,7 @@
     <jedis-client-version>2.8.1</jedis-client-version>
     <jedis-client-bundle-version>2.8.1_1</jedis-client-bundle-version>
     <jersey-version>2.11</jersey-version>
-    <jetty9-version>9.2.15.v20160210</jetty9-version>
+    <jetty9-version>9.3.8.v20160314</jetty9-version>
     <jetty-version>${jetty9-version}</jetty-version>
     <jetty-plugin-version>${jetty-version}</jetty-plugin-version>
     <jetty-runner-groupId>org.eclipse.jetty</jetty-runner-groupId>
@@ -629,7 +629,7 @@
       org.apache.commons.httpclient.*;version="[3.1,4.0)",
       org.apache.velocity.*;version="[1.6.2,2)",
       org.apache.xmlbeans.*;version="[2.4,3)",
-      org.eclipse.jetty.*;version="[8.0,10)",
+      org.eclipse.jetty.*;version="[9.0,10)",
       com.thoughtworks.xstream.*;version="[1.4.7,2)",
       org.antlr.stringtemplate.*;version="[3.0,4)",
       org.ccil.cowan.tagsoup.*;version="[1.2,2)",
@@ -3503,53 +3503,6 @@
       </build>
     </profile>
 
-    <!-- profiles for choosing default spring version -->
-    <profile>
-      <id>spring3.2</id>
-      <properties>
-        <spring-version>${spring32-version}</spring-version>
-      </properties>
-    </profile>
-    <profile>
-      <id>spring4</id>
-      <properties>
-        <spring-version>${spring4-version}</spring-version>
-        <camel-test-spring-artifactId>camel-test-spring</camel-test-spring-artifactId>
-      </properties>
-    </profile>
-
-    <profile>
-        <id>jetty9</id>
-        <properties>
-            <jetty-version>${jetty9-version}</jetty-version>
-            <jetty-plugin-version>${jetty9-version}</jetty-plugin-version>
-            <jetty-runner-groupId>org.eclipse.jetty</jetty-runner-groupId>
-        </properties>
-    </profile>
-
-    <profile>
-      <id>jdk1.7</id>
-      <activation>
-        <jdk>1.7</jdk>
-      </activation>
-
-      <!-- Update JAXB version here -->
-      <properties>
-        <jaxb-version>2.2.11</jaxb-version>
-      </properties>
-
-      <dependencies>
-        <dependency>
-          <groupId>com.sun.xml.bind</groupId>
-          <artifactId>jaxb-core</artifactId>
-        </dependency>
-        <dependency>
-          <groupId>com.sun.xml.bind</groupId>
-          <artifactId>jaxb-impl</artifactId>
-        </dependency>
-      </dependencies>
-    </profile>
-
     <profile>
       <id>jdk1.8</id>
       <activation>