You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by ni...@apache.org on 2014/07/24 10:27:32 UTC

[1/2] git commit: Clean up the NettyHttpServer shutdown code

Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 66dd8021a -> 26efeeae0
  refs/heads/master 5fbd407ba -> 994d43eff


Clean up the NettyHttpServer shutdown code


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/994d43ef
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/994d43ef
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/994d43ef

Branch: refs/heads/master
Commit: 994d43effba35130adf959f7c2aaf1dc05512a14
Parents: 5fbd407
Author: Willem Jiang <wi...@gmail.com>
Authored: Thu Jul 24 16:24:40 2014 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Thu Jul 24 16:24:40 2014 +0800

----------------------------------------------------------------------
 .../http/netty/server/NettyHttpServletPipelineFactory.java   | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/994d43ef/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/NettyHttpServletPipelineFactory.java
----------------------------------------------------------------------
diff --git a/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/NettyHttpServletPipelineFactory.java b/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/NettyHttpServletPipelineFactory.java
index 1b2c812..d185aa8 100644
--- a/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/NettyHttpServletPipelineFactory.java
+++ b/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/NettyHttpServletPipelineFactory.java
@@ -47,14 +47,14 @@ import io.netty.handler.ssl.SslHandler;
 import io.netty.handler.timeout.IdleStateHandler;
 import io.netty.util.concurrent.DefaultEventExecutorGroup;
 import io.netty.util.concurrent.EventExecutorGroup;
-import io.netty.util.concurrent.GlobalEventExecutor;
+import io.netty.util.concurrent.ImmediateEventExecutor;
 
 public class NettyHttpServletPipelineFactory extends ChannelInitializer<Channel> {
     private static final Logger LOG =
         LogUtils.getL7dLogger(NettyHttpServletPipelineFactory.class);
     
-    //TODO how to manage the allChannels
-    private final ChannelGroup allChannels = new DefaultChannelGroup(GlobalEventExecutor.INSTANCE);;
+    //Holds the child channel
+    private final ChannelGroup allChannels = new DefaultChannelGroup(ImmediateEventExecutor.INSTANCE);;
 
     private final HttpSessionWatchdog watchdog;
     
@@ -111,7 +111,7 @@ public class NettyHttpServletPipelineFactory extends ChannelInitializer<Channel>
     }
     
     public void shutdown() {
-        allChannels.close();
+        allChannels.close().awaitUninterruptibly();
         watchdog.stopWatching();
         applicationExecutor.shutdownGracefully();
     }


[2/2] git commit: Clean up the NettyHttpServer shutdown code

Posted by ni...@apache.org.
Clean up the NettyHttpServer shutdown code


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/26efeeae
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/26efeeae
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/26efeeae

Branch: refs/heads/3.0.x-fixes
Commit: 26efeeae05ffd54051458f30583fc516e5712a03
Parents: 66dd802
Author: Willem Jiang <wi...@gmail.com>
Authored: Thu Jul 24 16:24:40 2014 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Thu Jul 24 16:26:51 2014 +0800

----------------------------------------------------------------------
 .../http/netty/server/NettyHttpServletPipelineFactory.java   | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/26efeeae/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/NettyHttpServletPipelineFactory.java
----------------------------------------------------------------------
diff --git a/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/NettyHttpServletPipelineFactory.java b/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/NettyHttpServletPipelineFactory.java
index 1b2c812..d185aa8 100644
--- a/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/NettyHttpServletPipelineFactory.java
+++ b/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/NettyHttpServletPipelineFactory.java
@@ -47,14 +47,14 @@ import io.netty.handler.ssl.SslHandler;
 import io.netty.handler.timeout.IdleStateHandler;
 import io.netty.util.concurrent.DefaultEventExecutorGroup;
 import io.netty.util.concurrent.EventExecutorGroup;
-import io.netty.util.concurrent.GlobalEventExecutor;
+import io.netty.util.concurrent.ImmediateEventExecutor;
 
 public class NettyHttpServletPipelineFactory extends ChannelInitializer<Channel> {
     private static final Logger LOG =
         LogUtils.getL7dLogger(NettyHttpServletPipelineFactory.class);
     
-    //TODO how to manage the allChannels
-    private final ChannelGroup allChannels = new DefaultChannelGroup(GlobalEventExecutor.INSTANCE);;
+    //Holds the child channel
+    private final ChannelGroup allChannels = new DefaultChannelGroup(ImmediateEventExecutor.INSTANCE);;
 
     private final HttpSessionWatchdog watchdog;
     
@@ -111,7 +111,7 @@ public class NettyHttpServletPipelineFactory extends ChannelInitializer<Channel>
     }
     
     public void shutdown() {
-        allChannels.close();
+        allChannels.close().awaitUninterruptibly();
         watchdog.stopWatching();
         applicationExecutor.shutdownGracefully();
     }