Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 5F637200B12 for ; Sun, 12 Jun 2016 16:32:26 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 5DDD4160A60; Sun, 12 Jun 2016 14:32:26 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id AD5D3160A04 for ; Sun, 12 Jun 2016 16:32:25 +0200 (CEST) Received: (qmail 72367 invoked by uid 500); 12 Jun 2016 14:32:24 -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 72358 invoked by uid 99); 12 Jun 2016 14:32:24 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 Jun 2016 14:32:24 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id ADFD8DFDA9; Sun, 12 Jun 2016 14:32:24 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: davsclaus@apache.org To: commits@camel.apache.org Date: Sun, 12 Jun 2016 14:32:24 -0000 Message-Id: <97abf4a16b3d4b23811a2d8f6c6f7db2@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/4] camel git commit: CAMEL-10051 - Fixed issue with reuse channel. archived-at: Sun, 12 Jun 2016 14:32:26 -0000 Repository: camel Updated Branches: refs/heads/camel-2.17.x df2a31a4b -> cf939a692 refs/heads/master 7c4dd0b4f -> 3c11ff553 CAMEL-10051 - Fixed issue with reuse channel. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/96d3ce29 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/96d3ce29 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/96d3ce29 Branch: refs/heads/master Commit: 96d3ce29aadfe801b604b5db1db3581e64eb5ebd Parents: 7c4dd0b Author: grigoriadis Authored: Sun Jun 12 15:48:41 2016 +0300 Committer: Claus Ibsen Committed: Sun Jun 12 16:26:51 2016 +0200 ---------------------------------------------------------------------- .../org/apache/camel/component/netty4/NettyProducer.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/96d3ce29/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyProducer.java ---------------------------------------------------------------------- diff --git a/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyProducer.java b/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyProducer.java index a6bce2d..81e6cb2 100644 --- a/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyProducer.java +++ b/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyProducer.java @@ -282,7 +282,13 @@ public class NettyProducer extends DefaultAsyncProducer { // need to declare as final final Channel channel = existing; - final AsyncCallback producerCallback = new NettyProducerCallback(channel, callback); + final AsyncCallback producerCallback; + + if(configuration.isReuseChannel()) { + producerCallback = callback; + } else { + producerCallback = new NettyProducerCallback(channel, callback); + } // setup state as attachment on the channel, so we can access the state later when needed putState(channel, new NettyCamelState(producerCallback, exchange));