[jboss-cvs] JBossAS SVN: r64966 - in trunk/system-jmx/src/main/org/jboss/system: server/jmx and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Aug 30 08:45:07 EDT 2007
Author: adrian at jboss.org
Date: 2007-08-30 08:45:07 -0400 (Thu, 30 Aug 2007)
New Revision: 64966
Modified:
trunk/system-jmx/src/main/org/jboss/system/ServiceController.java
trunk/system-jmx/src/main/org/jboss/system/server/jmx/JMXKernel.java
Log:
Fix the problem of the ServiceController getting unregistered from the MC after it is unregistered from the MBeanServer
Modified: trunk/system-jmx/src/main/org/jboss/system/ServiceController.java
===================================================================
--- trunk/system-jmx/src/main/org/jboss/system/ServiceController.java 2007-08-30 12:32:13 UTC (rev 64965)
+++ trunk/system-jmx/src/main/org/jboss/system/ServiceController.java 2007-08-30 12:45:07 UTC (rev 64966)
@@ -574,6 +574,9 @@
++serviceCounter;
}
log.debug("Stopped " + serviceCounter + " services");
+
+ // Shutdown ourselves
+ controller.uninstall(ServiceControllerMBean.OBJECT_NAME.getCanonicalName());
}
public ObjectName preRegister(MBeanServer server, ObjectName name)
Modified: trunk/system-jmx/src/main/org/jboss/system/server/jmx/JMXKernel.java
===================================================================
--- trunk/system-jmx/src/main/org/jboss/system/server/jmx/JMXKernel.java 2007-08-30 12:32:13 UTC (rev 64965)
+++ trunk/system-jmx/src/main/org/jboss/system/server/jmx/JMXKernel.java 2007-08-30 12:45:07 UTC (rev 64966)
@@ -384,8 +384,15 @@
{
try
{
- mbeanServer.unregisterMBean(ServiceControllerMBean.OBJECT_NAME);
mbeanServer.unregisterMBean(ServerConfigImplMBean.OBJECT_NAME);
+ }
+ catch (Exception e)
+ {
+ Throwable t = JMXExceptionDecoder.decode(e);
+ log.error("Failed to unregister mbeans", t);
+ }
+ try
+ {
mbeanServer.unregisterMBean(ServerImplMBean.OBJECT_NAME);
}
catch (Exception e)
More information about the jboss-cvs-commits
mailing list