Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 15CBA10C41 for ; Thu, 11 Jul 2013 01:49:26 +0000 (UTC) Received: (qmail 55508 invoked by uid 500); 11 Jul 2013 01:49:25 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 55471 invoked by uid 500); 11 Jul 2013 01:49:25 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 55463 invoked by uid 99); 11 Jul 2013 01:49:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Jul 2013 01:49:25 +0000 X-ASF-Spam-Status: No, hits=0.6 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of willem.jiang@gmail.com designates 209.85.160.44 as permitted sender) Received: from [209.85.160.44] (HELO mail-pb0-f44.google.com) (209.85.160.44) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Jul 2013 01:49:21 +0000 Received: by mail-pb0-f44.google.com with SMTP id uo1so7284939pbc.31 for ; Wed, 10 Jul 2013 18:49:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:message-id:in-reply-to:references:subject:x-mailer :mime-version:content-type:content-transfer-encoding :content-disposition; bh=ygh6RZPXDtogw5bkLfHAfGkgSbE0g/Ob5g/En+n5feU=; b=Hckk7Or9H0WUZt+UF8IKaBNYC6RZgilg2GhBu3Q8iL1Jh7jlkPv0YOEu91EzbCdA5V 6ELR4s8SnAh/uCgHNfWN6/WXKOqj9Px3bPjLoTboozKnjKhn4u/YGWnv0C8DcslmwHx4 FFb4fC1BnAGYqF+3u4C79A8AboyWqvQOdoDGzd35K1MAou7r1vzUhaqcXsP0oLhGelTh DhypZCM5d6RvsKGHheIuiYTZ4vnsKmmphP1YkuDrdbVpXT3I+CWvcNRwNQm25COcj1Bf 4irDKaM31yv4wFWYq5Fx2/4zrhHwk4LC/1E9PJUopWwWlQ8mz2iRGwBiI2Hrr6tI796a Ii8A== X-Received: by 10.68.114.36 with SMTP id jd4mr34574274pbb.12.1373507341284; Wed, 10 Jul 2013 18:49:01 -0700 (PDT) Received: from [192.168.1.135] ([123.116.44.31]) by mx.google.com with ESMTPSA id wr9sm36670302pbc.7.2013.07.10.18.48.58 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 10 Jul 2013 18:49:00 -0700 (PDT) Date: Thu, 11 Jul 2013 09:48:56 +0800 From: Willem jiang To: users@camel.apache.org Message-ID: In-Reply-To: <1373501431754-5735496.post@n5.nabble.com> References: <1373501431754-5735496.post@n5.nabble.com> Subject: Re: How do I close Netty connections and shutdown my application gracefully? X-Mailer: sparrow 1.6.4 (build 1176) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Virus-Checked: Checked by ClamAV on apache.org You need to shutdown the template if you don't want to use it anymore. -- =20 Willem Jiang Red Hat, Inc. =46useSource is now part of Red Hat Web: http://www.fusesource.com =7C http://www.redhat.com Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) = (English) http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese) Twitter: willemjiang =20 Weibo: =E5=A7=9C=E5=AE=81willem On Thursday, July 11, 2013 at 8:10 AM, ignos wrote: > * camel 2.11.0 > * netty 3.6.5.=46inal > =20 > I make a simple main method to try out a simple message with Netty prod= ucer. > The message is well sended, but my application is not exit and tcp > connection is not closed. > =20 > How do I close TCP connections and shutdown my application gracefully=3F= > =20 > sendMessage(=22camel=5Ftcp=22, =22direct:tcp=22, =22Hello=22); > =20 > public void sendMessage(String contextId, String endPoint, String > message) =7B > SpringCamelContext context =3D (SpringCamelContext) > applicationContext.getBean(contextId); > ProducerTemplate template =3D context.createProducerTemplate(); > template.sendBody(endPoint, message); > =7D > =20 > xmlns=3D=22http://camel.apache.org/schema/spring=22> > > > uri=3D=22netty:tcp://localhost:9200=3Fdisconnect=3Dtrue&textline=3D= true=22 /> > > > =20 > =20 > =20 > =20 > -- > View this message in context: http://camel.465427.n5.nabble.com/How-do-= I-close-Netty-connections-and-shutdown-my-application-gracefully-tp573549= 6.html > Sent from the Camel - Users mailing list archive at Nabble.com (http://= Nabble.com).