You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2013/02/18 12:39:59 UTC

svn commit: r1447205 - in /camel/branches/camel-2.9.x: ./ components/camel-cxf/ components/camel-cxf/src/main/java/org/apache/camel/component/cxf/ components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jms/ components/camel-cxf/src/test/reso...

Author: ningjiang
Date: Mon Feb 18 11:39:58 2013
New Revision: 1447205

URL: http://svn.apache.org/r1447205
Log:
CAMEL-6084 Fix the issue that SOAP over JMS doesn't work with camel-cxf endpoint
Merged revisions 1447153 via svnmerge from 
https://svn.apache.org/repos/asf/camel/branches/camel-2.10.x

................
  r1447153 | ningjiang | 2013-02-18 16:58:14 +0800 (Mon, 18 Feb 2013) | 10 lines
  
  Merged revisions 1447146 via svnmerge from 
  https://svn.apache.org/repos/asf/camel/trunk
  
  ........
    r1447146 | ningjiang | 2013-02-18 16:27:17 +0800 (Mon, 18 Feb 2013) | 1 line
    
    CAMEL-6084 Fix the issue that SOAP over JMS doesn't work with camel-cxf endpoint
  ........
................

Added:
    camel/branches/camel-2.9.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jms/
      - copied from r1447153, camel/branches/camel-2.10.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jms/
    camel/branches/camel-2.9.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jms/CxfEndpointJMSConsumerTest.java
      - copied unchanged from r1447153, camel/branches/camel-2.10.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jms/CxfEndpointJMSConsumerTest.java
    camel/branches/camel-2.9.x/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jms/
      - copied from r1447153, camel/branches/camel-2.10.x/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jms/
    camel/branches/camel-2.9.x/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jms/camel-context.xml
      - copied unchanged from r1447153, camel/branches/camel-2.10.x/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jms/camel-context.xml
Modified:
    camel/branches/camel-2.9.x/   (props changed)
    camel/branches/camel-2.9.x/components/camel-cxf/pom.xml
    camel/branches/camel-2.9.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java
    camel/branches/camel-2.9.x/components/camel-jms/   (props changed)

Propchange: camel/branches/camel-2.9.x/
------------------------------------------------------------------------------
  Merged /camel/trunk:r1447146
  Merged /camel/branches/camel-2.10.x:r1447153

Propchange: camel/branches/camel-2.9.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: camel/branches/camel-2.9.x/components/camel-cxf/pom.xml
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-cxf/pom.xml?rev=1447205&r1=1447204&r2=1447205&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/components/camel-cxf/pom.xml (original)
+++ camel/branches/camel-2.9.x/components/camel-cxf/pom.xml Mon Feb 18 11:39:58 2013
@@ -150,6 +150,20 @@
       <artifactId>camel-test</artifactId>
       <scope>test</scope>
     </dependency>
+    
+    <!-- test for the cxf jms transport -->
+    <dependency>
+       <groupId>org.apache.activemq</groupId>
+       <artifactId>activemq-core</artifactId>
+       <scope>test</scope>
+    </dependency>
+    
+    <dependency>
+      <groupId>org.apache.cxf</groupId>
+      <artifactId>cxf-rt-transports-jms</artifactId>
+      <version>${cxf-version}</version>
+      <scope>test</scope>
+    </dependency>
 
     <dependency>
       <groupId>org.apache.cxf</groupId>

Modified: camel/branches/camel-2.9.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java?rev=1447205&r1=1447204&r2=1447205&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java (original)
+++ camel/branches/camel-2.9.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java Mon Feb 18 11:39:58 2013
@@ -76,7 +76,8 @@ public class CxfConsumer extends Default
                 }
             }            
             
-            // NOTE this code cannot work with CXF 2.2.x
+            // NOTE this code cannot work with CXF 2.2.x and JMSContinuation
+            // as it doesn't break out the interceptor chain when we call it 
             private Object asyncInvoke(Exchange cxfExchange, final Continuation continuation) {
                 synchronized (continuation) {
                     if (continuation.isNew()) {
@@ -114,7 +115,14 @@ public class CxfConsumer extends Default
             private Continuation getContinuation(Exchange cxfExchange) {
                 ContinuationProvider provider = 
                     (ContinuationProvider)cxfExchange.getInMessage().get(ContinuationProvider.class.getName());
-                return provider == null ? null : provider.getContinuation();
+                Continuation continuation = provider == null ? null : provider.getContinuation();
+                // Make sure we don't return the JMSContinuation, as it doesn't support the Continuation we wants
+                // Don't want to introduce the dependency of cxf-rt-transprot-jms here
+                if (continuation != null && continuation.getClass().getName().equals("org.apache.cxf.transport.jms.continuations.JMSContinuation")) {
+                    return null;
+                } else {
+                    return continuation;
+                }
             }
             
             private Object syncInvoke(Exchange cxfExchange) {

Propchange: camel/branches/camel-2.9.x/components/camel-jms/
------------------------------------------------------------------------------
    svn:mergeinfo = /camel/trunk/components/camel-jms:1447146