Return-Path: X-Original-To: apmail-camel-commits-archive@www.apache.org Delivered-To: apmail-camel-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 411969BAF for ; Wed, 1 Feb 2012 04:45:21 +0000 (UTC) Received: (qmail 4803 invoked by uid 500); 1 Feb 2012 04:45:18 -0000 Delivered-To: apmail-camel-commits-archive@camel.apache.org Received: (qmail 4612 invoked by uid 500); 1 Feb 2012 04:45:02 -0000 Mailing-List: contact commits-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list commits@camel.apache.org Received: (qmail 4572 invoked by uid 99); 1 Feb 2012 04:44:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Feb 2012 04:44:55 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Feb 2012 04:44:46 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 3CEDF23889EB for ; Wed, 1 Feb 2012 04:44:26 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@camel.apache.org From: ningjiang@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120201044426.3CEDF23889EB@eris.apache.org> 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); } }