From: fhanik Date: Thu, 9 Aug 2007 02:06:32 +0000 (+0000) Subject: remove throwing of exceptions, handle everything inside the JMX helper X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=4f7545953cfec33b80b3a3d9713cbe28115ffcd5;p=tomcat7.0 remove throwing of exceptions, handle everything inside the JMX helper git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@564074 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/catalina/ha/jmx/ClusterJmxHelper.java b/java/org/apache/catalina/ha/jmx/ClusterJmxHelper.java index 0e559ae2b..93365d757 100644 --- a/java/org/apache/catalina/ha/jmx/ClusterJmxHelper.java +++ b/java/org/apache/catalina/ha/jmx/ClusterJmxHelper.java @@ -100,12 +100,17 @@ public class ClusterJmxHelper { } } - public static boolean unregisterDefaultCluster(SimpleTcpCluster cluster) throws Exception { - ObjectName clusterName = getDefaultClusterName(cluster); - if (getMBeanServer().isRegistered(clusterName)) { - getMBeanServer().unregisterMBean(clusterName); + public static boolean unregisterDefaultCluster(SimpleTcpCluster cluster) { + try { + ObjectName clusterName = getDefaultClusterName(cluster); + if (getMBeanServer().isRegistered(clusterName)) { + getMBeanServer().unregisterMBean(clusterName); + } + return true; + }catch ( Exception x ) { + log.warn("Unable to unregister default cluster implementation with JMX",x); + return false; } - return true; } private static ObjectName getDefaultClusterName(SimpleTcpCluster cluster) throws Exception {