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 09:58:15 UTC
svn commit: r1447153 - in /camel/branches/camel-2.10.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/res...
Author: ningjiang
Date: Mon Feb 18 08:58:14 2013
New Revision: 1447153
URL: http://svn.apache.org/r1447153
Log:
CAMEL-6084 Fix the issue that SOAP over JMS doesn't work with camel-cxf endpoint
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.10.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jms/
- copied from r1447146, camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jms/
camel/branches/camel-2.10.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jms/CxfEndpointJMSConsumerTest.java
- copied unchanged from r1447146, camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jms/CxfEndpointJMSConsumerTest.java
camel/branches/camel-2.10.x/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jms/
- copied from r1447146, camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jms/
camel/branches/camel-2.10.x/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jms/camel-context.xml
- copied unchanged from r1447146, camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jms/camel-context.xml
Modified:
camel/branches/camel-2.10.x/ (props changed)
camel/branches/camel-2.10.x/components/camel-cxf/pom.xml
camel/branches/camel-2.10.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java
camel/branches/camel-2.10.x/components/camel-jms/ (props changed)
Propchange: camel/branches/camel-2.10.x/
------------------------------------------------------------------------------
Merged /camel/trunk:r1447146
Propchange: camel/branches/camel-2.10.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: camel/branches/camel-2.10.x/components/camel-cxf/pom.xml
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.10.x/components/camel-cxf/pom.xml?rev=1447153&r1=1447152&r2=1447153&view=diff
==============================================================================
--- camel/branches/camel-2.10.x/components/camel-cxf/pom.xml (original)
+++ camel/branches/camel-2.10.x/components/camel-cxf/pom.xml Mon Feb 18 08:58:14 2013
@@ -150,6 +150,20 @@
<artifactId>camel-test-spring</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.10.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.10.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java?rev=1447153&r1=1447152&r2=1447153&view=diff
==============================================================================
--- camel/branches/camel-2.10.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java (original)
+++ camel/branches/camel-2.10.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java Mon Feb 18 08:58:14 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.10.x/components/camel-jms/
------------------------------------------------------------------------------
Merged /camel/trunk/components/camel-jms:r1447146