svn commit: r1031394 - /camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1031394 - /camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java

ningjiang
Author: ningjiang
Date: Fri Nov  5 01:46:29 2010
New Revision: 1031394

URL: http://svn.apache.org/viewvc?rev=1031394&view=rev
Log:
CAMEL-3310 revert the change that I committed by mistaking

Modified:
    camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java

Modified: camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java?rev=1031394&r1=1031393&r2=1031394&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java (original)
+++ camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java Fri Nov  5 01:46:29 2010
@@ -75,10 +75,16 @@ public class CxfConsumer extends Default
                 synchronized (continuation) {
                     if (continuation.isNew()) {
                         final org.apache.camel.Exchange camelExchange = perpareCamelExchange(cxfExchange);
-                        // TODO we need to use the CXF 2.3.0 new Continuation API in CAMEL 3.0.0
-                        // The below code should work for CXF 2.2.x and CXF 2.3.x at the same time
+                        
+                        // Now we don't set up the timeout value
+                        if (LOG.isTraceEnabled()) {
+                            LOG.trace("Suspending continuation of exchangeId: " + camelExchange.getExchangeId());
+                        }
+                        // The continuation could be called before the suspend is called
+                        continuation.suspend(0);
+
                         // use the asynchronous API to process the exchange
-                        boolean sync = getAsyncProcessor().process(camelExchange, new AsyncCallback() {
+                        getAsyncProcessor().process(camelExchange, new AsyncCallback() {
                             public void done(boolean doneSync) {
                                 // make sure the continuation resume will not be called before the suspend method in other thread
                                 synchronized (continuation) {
@@ -92,26 +98,7 @@ public class CxfConsumer extends Default
                                 }
                             }
                         });
-                        // just need to avoid the continuation.resume is called
-                        // before the continuation.suspend is called
-                        if (continuation.getObject() != camelExchange && !sync) {
-                            // Now we don't set up the timeout value
-                            if (LOG.isTraceEnabled()) {
-                                LOG.trace("Suspending continuation of exchangeId: "
-                                          + camelExchange.getExchangeId());
-                            }
-                            // The continuation could be called before the
-                            // suspend is called
-                            continuation.suspend(0);
-                        } else {
-                            // just set the response back, as the invoking
-                            // thread is not changed
-                            if (LOG.isTraceEnabled()) {
-                                LOG.trace("Processed the Exchange : " + camelExchange.getExchangeId());
-                            }
-                            setResponseBack(cxfExchange, camelExchange);
-                        }
-
+                        
                     }
                     if (continuation.isResumed()) {
                         org.apache.camel.Exchange camelExchange = (org.apache.camel.Exchange)continuation