From cf54341ae60d3e22c24e23995d7ca34175368ea6 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Tue, 5 Mar 2013 10:36:37 +1100 Subject: [PATCH] 399967 Shutdown hook calls destroy --- .../org/eclipse/jetty/util/thread/ShutdownThread.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/thread/ShutdownThread.java b/jetty-util/src/main/java/org/eclipse/jetty/util/thread/ShutdownThread.java index 427f9514752..dd08aca19cb 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/thread/ShutdownThread.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/thread/ShutdownThread.java @@ -22,6 +22,7 @@ import java.util.Arrays; import java.util.List; import java.util.concurrent.CopyOnWriteArrayList; +import org.eclipse.jetty.util.component.Destroyable; import org.eclipse.jetty.util.component.LifeCycle; import org.eclipse.jetty.util.log.Log; import org.eclipse.jetty.util.log.Logger; @@ -79,7 +80,7 @@ public class ShutdownThread extends Thread catch(Exception e) { LOG.ignore(e); - LOG.info("shutdown already commenced"); + LOG.debug("shutdown already commenced"); } } @@ -131,6 +132,12 @@ public class ShutdownThread extends Thread lifeCycle.stop(); LOG.debug("Stopped {}",lifeCycle); } + + if (lifeCycle instanceof Destroyable) + { + ((Destroyable)lifeCycle).destroy(); + LOG.debug("Destroyed {}",lifeCycle); + } } catch (Exception ex) {