diff --git a/core/net/src/main/java/org/onosproject/core/impl/CoreManager.java b/core/net/src/main/java/org/onosproject/core/impl/CoreManager.java
index d860b9c..375de99 100644
--- a/core/net/src/main/java/org/onosproject/core/impl/CoreManager.java
+++ b/core/net/src/main/java/org/onosproject/core/impl/CoreManager.java
@@ -64,9 +64,9 @@
     @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
     protected ComponentConfigService cfgService;
 
-    @Property(name = "sharedThreadPoolSize", intValue = SharedExecutors.DEFAULT_THREAD_SIZE,
+    @Property(name = "sharedThreadPoolSize", intValue = SharedExecutors.DEFAULT_POOL_SIZE,
             label = "Configure shared pool maximum size ")
-    private int sharedThreadPoolSize = SharedExecutors.DEFAULT_THREAD_SIZE;
+    private int sharedThreadPoolSize = SharedExecutors.DEFAULT_POOL_SIZE;
 
     @Activate
     public void activate() {
@@ -80,6 +80,7 @@
     @Deactivate
     public void deactivate() {
         cfgService.unregisterProperties(getClass(), false);
+        SharedExecutors.shutdown();
     }
 
     @Override
diff --git a/utils/misc/src/main/java/org/onlab/util/SharedExecutorService.java b/utils/misc/src/main/java/org/onlab/util/SharedExecutorService.java
new file mode 100644
index 0000000..2cfdb5a
--- /dev/null
+++ b/utils/misc/src/main/java/org/onlab/util/SharedExecutorService.java
@@ -0,0 +1,138 @@
+/*
+ * Copyright 2015 Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onlab.util;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+
+/**
+ * Executor service wrapper for shared executors with safeguards on shutdown
+ * to prevent inadvertent shutdown.
+ */
+class SharedExecutorService implements ExecutorService {
+
+    private static final String NOT_ALLOWED = "Shutdown of shared executor is not allowed";
+
+    private ExecutorService executor;
+
+    /**
+     * Creates a wrapper for the given executor service.
+     *
+     * @param executor executor service to wrap
+     */
+    SharedExecutorService(ExecutorService executor) {
+        this.executor = executor;
+    }
+
+    /**
+     * Returns the backing executor service.
+     *
+     * @return backing executor service
+     */
+    ExecutorService backingExecutor() {
+        return executor;
+    }
+
+    /**
+     * Swaps the backing executor with a new one and shuts down the old one.
+     *
+     * @param executor new executor service
+     */
+    void setBackingExecutor(ExecutorService executor) {
+        ExecutorService oldExecutor = this.executor;
+        this.executor = executor;
+        oldExecutor.shutdown();
+    }
+
+    @Override
+    public void shutdown() {
+        throw new UnsupportedOperationException(NOT_ALLOWED);
+    }
+
+    @Override
+    public List<Runnable> shutdownNow() {
+        throw new UnsupportedOperationException(NOT_ALLOWED);
+    }
+
+    @Override
+    public boolean isShutdown() {
+        return executor.isShutdown();
+    }
+
+    @Override
+    public boolean isTerminated() {
+        return executor.isTerminated();
+    }
+
+    @Override
+    public boolean awaitTermination(long timeout, TimeUnit unit)
+            throws InterruptedException {
+        return executor.awaitTermination(timeout, unit);
+    }
+
+    @Override
+    public <T> Future<T> submit(Callable<T> task) {
+        return executor.submit(task);
+    }
+
+    @Override
+    public <T> Future<T> submit(Runnable task, T result) {
+        return executor.submit(task, result);
+    }
+
+    @Override
+    public Future<?> submit(Runnable task) {
+        return executor.submit(task);
+    }
+
+    @Override
+    public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks)
+            throws InterruptedException {
+        return executor.invokeAll(tasks);
+    }
+
+    @Override
+    public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks,
+                                         long timeout, TimeUnit unit)
+            throws InterruptedException {
+        return executor.invokeAll(tasks, timeout, unit);
+    }
+
+    @Override
+    public <T> T invokeAny(Collection<? extends Callable<T>> tasks)
+            throws InterruptedException, ExecutionException {
+        return executor.invokeAny(tasks);
+    }
+
+    @Override
+    public <T> T invokeAny(Collection<? extends Callable<T>> tasks,
+                           long timeout, TimeUnit unit)
+            throws InterruptedException, ExecutionException, TimeoutException {
+        return invokeAny(tasks, timeout, unit);
+    }
+
+    @Override
+    public void execute(Runnable command) {
+        executor.execute(command);
+    }
+
+}
diff --git a/utils/misc/src/main/java/org/onlab/util/SharedExecutors.java b/utils/misc/src/main/java/org/onlab/util/SharedExecutors.java
index 626aafb..0dadce8 100644
--- a/utils/misc/src/main/java/org/onlab/util/SharedExecutors.java
+++ b/utils/misc/src/main/java/org/onlab/util/SharedExecutors.java
@@ -18,9 +18,8 @@
 
 import java.util.Timer;
 import java.util.concurrent.ExecutorService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
+import static com.google.common.base.Preconditions.checkArgument;
 import static java.util.concurrent.Executors.newFixedThreadPool;
 import static java.util.concurrent.Executors.newSingleThreadExecutor;
 import static org.onlab.util.Tools.groupedThreads;
@@ -36,21 +35,20 @@
  */
 public final class SharedExecutors {
 
-    private static final Logger log = LoggerFactory.getLogger(SharedExecutors.class);
+    public static final int DEFAULT_POOL_SIZE = 30;
 
-    // TODO: make this configurable via setPoolSize static method
-    public static final int DEFAULT_THREAD_SIZE = 30;
-    private static int poolSize = DEFAULT_THREAD_SIZE;
+    private static SharedExecutorService singleThreadExecutor =
+            new SharedExecutorService(
+                    newSingleThreadExecutor(groupedThreads("onos/shared",
+                                                           "onos-single-executor")));
 
-    private static ExecutorService singleThreadExecutor =
-            newSingleThreadExecutor(groupedThreads("onos/shared",
-                                                   "onos-single-executor"));
+    private static SharedExecutorService poolThreadExecutor =
+            new SharedExecutorService(
+                    newFixedThreadPool(DEFAULT_POOL_SIZE,
+                                       groupedThreads("onos/shared",
+                                                      "onos-pool-executor-%d")));
 
-    private static ExecutorService poolThreadExecutor =
-            newFixedThreadPool(poolSize, groupedThreads("onos/shared",
-                                                               "onos-pool-executor-%d"));
-
-    private static Timer sharedTimer = new Timer("onos-shared-timer");
+    private static SharedTimer sharedTimer = new SharedTimer();
 
     // Ban public construction
     private SharedExecutors() {
@@ -85,17 +83,41 @@
 
     /**
      * Sets the shared thread pool size.
-     * @param poolSize
+     *
+     * @param poolSize new pool size
      */
     public static void setPoolSize(int poolSize) {
-        if (poolSize > 0) {
-            SharedExecutors.poolSize = poolSize;
-            //TODO: wait for execution previous task in the queue .
-            poolThreadExecutor.shutdown();
-            poolThreadExecutor = newFixedThreadPool(poolSize, groupedThreads("onos/shared",
-                    "onos-pool-executor-%d"));
-        } else {
-            log.warn("Shared Pool Size size must be greater than 0");
+        checkArgument(poolSize > 0, "Shared pool size size must be greater than 0");
+        poolThreadExecutor.setBackingExecutor(
+                newFixedThreadPool(poolSize, groupedThreads("onos/shared",
+                                                            "onos-pool-executor-%d")));
+    }
+
+    /**
+     * Shuts down all shared timers and executors and therefore should be
+     * called only by the framework.
+     */
+    public static void shutdown() {
+        sharedTimer.shutdown();
+        singleThreadExecutor.backingExecutor().shutdown();
+        poolThreadExecutor.backingExecutor().shutdown();
+    }
+
+    // Timer extension which does not allow outside cancel method.
+    private static class SharedTimer extends Timer {
+
+        public SharedTimer() {
+            super("onos-shared-timer");
+        }
+
+        @Override
+        public void cancel() {
+            throw new UnsupportedOperationException("Cancel of shared timer is not allowed");
+        }
+
+        private void shutdown() {
+            super.cancel();
         }
     }
+
 }
diff --git a/utils/misc/src/main/java/org/onlab/util/SlidingWindowCounter.java b/utils/misc/src/main/java/org/onlab/util/SlidingWindowCounter.java
index 5c14d95..4f0093c 100644
--- a/utils/misc/src/main/java/org/onlab/util/SlidingWindowCounter.java
+++ b/utils/misc/src/main/java/org/onlab/util/SlidingWindowCounter.java
@@ -58,13 +58,13 @@
 
         // Initialize each item in the list to an AtomicLong of 0
         this.counters = Collections.nCopies(windowSlots, 0)
-                    .stream()
-                    .map(AtomicLong::new)
-                    .collect(Collectors.toCollection(ArrayList::new));
+                .stream()
+                .map(AtomicLong::new)
+                .collect(Collectors.toCollection(ArrayList::new));
 
         background = Executors.newSingleThreadScheduledExecutor();
         background.scheduleWithFixedDelay(this::advanceHead, 0,
-                SLIDE_WINDOW_PERIOD_SECONDS, TimeUnit.SECONDS);
+                                          SLIDE_WINDOW_PERIOD_SECONDS, TimeUnit.SECONDS);
     }
 
     /**
