qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kw...@apache.org
Subject svn commit: r1736479 - /qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/model/AbstractSystemConfig.java
Date Thu, 24 Mar 2016 17:55:07 GMT
Author: kwall
Date: Thu Mar 24 17:55:06 2016
New Revision: 1736479

URL: http://svn.apache.org/viewvc?rev=1736479&view=rev
Log:
QPID-7161: [Java Broker] Remove the shutdown hook earlier in closing sequence

Modified:
    qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/model/AbstractSystemConfig.java

Modified: qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/model/AbstractSystemConfig.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/model/AbstractSystemConfig.java?rev=1736479&r1=1736478&r2=1736479&view=diff
==============================================================================
--- qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/model/AbstractSystemConfig.java
(original)
+++ qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/model/AbstractSystemConfig.java
Thu Mar 24 17:55:06 2016
@@ -121,20 +121,27 @@ public abstract class AbstractSystemConf
     }
 
     @Override
+    protected ListenableFuture<Void> beforeClose()
+    {
+        try
+        {
+            boolean removed = Runtime.getRuntime().removeShutdownHook(_shutdownHook);
+            LOGGER.debug("Removed shutdown hook : {}", removed);
+        }
+        catch(IllegalStateException ise)
+        {
+            //ignore, means the JVM is already shutting down
+        }
+
+        return super.beforeClose();
+    }
+
+    @Override
     protected void onClose()
     {
         final TaskExecutor taskExecutor = getTaskExecutor();
         try
         {
-            try
-            {
-                boolean removed = Runtime.getRuntime().removeShutdownHook(_shutdownHook);
-                LOGGER.debug("Removed shutdown hook : {}", removed);
-            }
-            catch(IllegalStateException ise)
-            {
-                //ignore, means the JVM is already shutting down
-            }
 
             if (taskExecutor != null)
             {



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message