qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rob...@apache.org
Subject svn commit: r1031306 - /qpid/trunk/qpid/java/broker-plugins/experimental/shutdown/src/main/java/org/apache/qpid/shutdown/Activator.java
Date Thu, 04 Nov 2010 22:34:45 GMT
Author: robbie
Date: Thu Nov  4 22:34:45 2010
New Revision: 1031306

URL: http://svn.apache.org/viewvc?rev=1031306&view=rev
Log:
QPID-2927: catch and ignore InstanceNotFoundException as this is not unexpected during a clean
broker shutdown with the plugin loaded

Modified:
    qpid/trunk/qpid/java/broker-plugins/experimental/shutdown/src/main/java/org/apache/qpid/shutdown/Activator.java

Modified: qpid/trunk/qpid/java/broker-plugins/experimental/shutdown/src/main/java/org/apache/qpid/shutdown/Activator.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/experimental/shutdown/src/main/java/org/apache/qpid/shutdown/Activator.java?rev=1031306&r1=1031305&r2=1031306&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/experimental/shutdown/src/main/java/org/apache/qpid/shutdown/Activator.java
(original)
+++ qpid/trunk/qpid/java/broker-plugins/experimental/shutdown/src/main/java/org/apache/qpid/shutdown/Activator.java
Thu Nov  4 22:34:45 2010
@@ -21,6 +21,7 @@ package org.apache.qpid.shutdown;
 
 import java.lang.management.ManagementFactory;
 
+import javax.management.InstanceNotFoundException;
 import javax.management.MBeanServer;
 import javax.management.ObjectName;
 
@@ -56,7 +57,14 @@ public class Activator implements Bundle
         // Unregister MBean
         MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
         ObjectName name = new ObjectName(SHUTDOWN_MBEAN_NAME);
-        mbs.unregisterMBean(name);
+        try
+        {
+            mbs.unregisterMBean(name);
+        }
+        catch (InstanceNotFoundException e)
+        {
+            //ignore
+        }
 
         _logger.info("Shutdown plugin MBean unregistered");
     }



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message