Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-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 B7F9310475 for ; Mon, 20 Jan 2014 06:55:43 +0000 (UTC) Received: (qmail 45894 invoked by uid 500); 20 Jan 2014 06:55:42 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 45775 invoked by uid 500); 20 Jan 2014 06:55:37 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 45768 invoked by uid 99); 20 Jan 2014 06:55:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Jan 2014 06:55:35 +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; Mon, 20 Jan 2014 06:55:34 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id DA1892388994; Mon, 20 Jan 2014 06:55:13 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1559631 - /cxf/trunk/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/NettyHttpServletPipelineFactory.java Date: Mon, 20 Jan 2014 06:55:13 -0000 To: commits@cxf.apache.org From: ningjiang@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140120065513.DA1892388994@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: ningjiang Date: Mon Jan 20 06:55:13 2014 New Revision: 1559631 URL: http://svn.apache.org/r1559631 Log: CXF-5501 NettyHttpServletPipelineFactory should shutdown the executor for running application Modified: cxf/trunk/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/NettyHttpServletPipelineFactory.java Modified: cxf/trunk/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/NettyHttpServletPipelineFactory.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/NettyHttpServletPipelineFactory.java?rev=1559631&r1=1559630&r2=1559631&view=diff ============================================================================== --- cxf/trunk/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/NettyHttpServletPipelineFactory.java (original) +++ cxf/trunk/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/NettyHttpServletPipelineFactory.java Mon Jan 20 06:55:13 2014 @@ -68,6 +68,8 @@ public class NettyHttpServletPipelineFac private final Map handlerMap; private final int maxChunkContentSize; + + private final EventExecutorGroup applicationExecutor; public NettyHttpServletPipelineFactory(TLSServerParameters tlsServerParameters, boolean supportSession, int threadPoolSize, int maxChunkContentSize, @@ -79,6 +81,8 @@ public class NettyHttpServletPipelineFac this.handlerMap = handlerMap; this.tlsServerParameters = tlsServerParameters; this.maxChunkContentSize = maxChunkContentSize; + //TODO need to configure the thread size of EventExecutorGroup + applicationExecutor = new DefaultEventExecutorGroup(16); } @@ -110,7 +114,7 @@ public class NettyHttpServletPipelineFac public void shutdown() { allChannels.close(); watchdog.stopWatching(); - + applicationExecutor.shutdownGracefully(); } protected HttpSessionStore getHttpSessionStore() { @@ -194,9 +198,8 @@ public class NettyHttpServletPipelineFac @Override protected void initChannel(Channel ch) throws Exception { ChannelPipeline pipeline = getDefaulHttpChannelPipeline(ch); - //TODO need to configure the thread size of EventExecutorGroup - EventExecutorGroup e1 = new DefaultEventExecutorGroup(16); - pipeline.addLast(e1, "handler", this.getServletHandler()); + + pipeline.addLast(applicationExecutor, "handler", this.getServletHandler()); } }