cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
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 GMT
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<String, NettyHttpContextHandler> 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());
     }
 
 }



Mime
View raw message