camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r1238937 - /camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfClientCallback.java
Date Wed, 01 Feb 2012 04:44:26 GMT
Author: ningjiang
Date: Wed Feb  1 04:44:25 2012
New Revision: 1238937

URL: http://svn.apache.org/viewvc?rev=1238937&view=rev
Log:
CAMEL-4945 avoiding to call the done for oneway operation

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

Modified: camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfClientCallback.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfClientCallback.java?rev=1238937&r1=1238936&r2=1238937&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfClientCallback.java
(original)
+++ camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfClientCallback.java
Wed Feb  1 04:44:25 2012
@@ -50,16 +50,19 @@ public class CxfClientCallback extends C
         try {
             super.handleResponse(ctx, res);            
         } finally {
-            // bind the CXF response to Camel exchange
+            // bind the CXF response to Camel exchange and
+            // call camel callback
+            // for one way messages callback is already called in 
+            // process method of org.apache.camel.component.cxf.CxfProducer
             if (!boi.getOperationInfo().isOneWay()) {
                 // copy the InMessage header to OutMessage header
                 camelExchange.getOut().getHeaders().putAll(camelExchange.getIn().getHeaders());
                 binding.populateExchangeFromCxfResponse(camelExchange, cxfExchange, ctx);
+                camelAsyncCallback.done(false);
             }
             if (LOG.isDebugEnabled()) {
                 LOG.debug("{} calling handleResponse", Thread.currentThread().getName());
             }
-            camelAsyncCallback.done(false);
         }
     }
     
@@ -68,16 +71,19 @@ public class CxfClientCallback extends C
             super.handleException(ctx, ex);
             camelExchange.setException(ex);
         } finally {
-            // copy the context information
+            // copy the context information and 
+            // call camel callback
+            // for one way messages callback is already called in 
+            // process method of org.apache.camel.component.cxf.CxfProducer
             if (!boi.getOperationInfo().isOneWay()) {
                 // copy the InMessage header to OutMessage header
                 camelExchange.getOut().getHeaders().putAll(camelExchange.getIn().getHeaders());
                 binding.populateExchangeFromCxfResponse(camelExchange, cxfExchange, ctx);
+                camelAsyncCallback.done(false);
             }
             if (LOG.isDebugEnabled()) {
                 LOG.debug("{} calling handleException", Thread.currentThread().getName());
             }
-            camelAsyncCallback.done(false);
         }
     }        
 



Mime
View raw message