Enable netty config modules to restart when blueprint container restarts
authorTom Pantelis <tpanteli@brocade.com>
Tue, 19 Apr 2016 05:09:39 +0000 (01:09 -0400)
committerTom Pantelis <tpanteli@brocade.com>
Wed, 15 Jun 2016 22:47:36 +0000 (18:47 -0400)
Added the necessary service properties such that when the blueprint
container is restarted on config change the associated config system
Module instances are recreated/restarted. This for backwards compatibility
for existing CSS modules that inject the netty CSS modules.

Change-Id: Icb12968805d8760cb03d3eea1e8ceda5ec1de2f5
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
src/main/java/org/opendaylight/protocol/framework/AbstractDispatcher.java

index 17663d982c5e188f7c898f9575571fb478e61bc5..0aae75deddb88938d70f53453e813dd2a1e68e54 100644 (file)
@@ -7,15 +7,7 @@
  */
 package org.opendaylight.protocol.framework;
 
-import java.io.Closeable;
-import java.net.InetSocketAddress;
-import java.net.SocketAddress;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
 import com.google.common.base.Preconditions;
-
 import io.netty.bootstrap.Bootstrap;
 import io.netty.bootstrap.ServerBootstrap;
 import io.netty.buffer.PooledByteBufAllocator;
@@ -34,6 +26,11 @@ import io.netty.util.concurrent.EventExecutor;
 import io.netty.util.concurrent.Future;
 import io.netty.util.concurrent.GlobalEventExecutor;
 import io.netty.util.concurrent.Promise;
+import java.io.Closeable;
+import java.net.InetSocketAddress;
+import java.net.SocketAddress;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Dispatcher class for creating servers and clients. The idea is to first create servers and clients and the run the
@@ -274,10 +271,5 @@ public abstract class AbstractDispatcher<S extends ProtocolSession<?>, L extends
     @Deprecated
     @Override
     public void close() {
-        try {
-            this.workerGroup.shutdownGracefully();
-        } finally {
-            this.bossGroup.shutdownGracefully();
-        }
     }
 }