[jboss-cvs] JBossAS SVN: r59550 - branches/JBoss_4_0_5_GA_JBAS-3978/system/src/main/org/jboss/system/server/jmx.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Jan 11 15:22:33 EST 2007
Author: scott.stark at jboss.org
Date: 2007-01-11 15:22:31 -0500 (Thu, 11 Jan 2007)
New Revision: 59550
Modified:
branches/JBoss_4_0_5_GA_JBAS-3978/system/src/main/org/jboss/system/server/jmx/LazyMBeanServer.java
Log:
JBAS-3978, reload the domain mappings if an InstanceNotFoundException is seen in isInstanceOf to synch up the platform vs jboss mbean server domains.
Modified: branches/JBoss_4_0_5_GA_JBAS-3978/system/src/main/org/jboss/system/server/jmx/LazyMBeanServer.java
===================================================================
--- branches/JBoss_4_0_5_GA_JBAS-3978/system/src/main/org/jboss/system/server/jmx/LazyMBeanServer.java 2007-01-11 19:46:10 UTC (rev 59549)
+++ branches/JBoss_4_0_5_GA_JBAS-3978/system/src/main/org/jboss/system/server/jmx/LazyMBeanServer.java 2007-01-11 20:22:31 UTC (rev 59550)
@@ -61,9 +61,13 @@
public class LazyMBeanServer
implements MBeanServer
{
+ /** The MBeanServer that was registered */
private static MBeanServer registeredServer;
+ /** The jboss MBeanServer implementation */
private static MBeanServer theServer;
+ /** The jdk MBeanServer implementation */
private static MBeanServer platformServer;
+ /** The default domain to use for mbeans */
private static String defaultDomain;
private static MBeanServerDelegate theDelegate;
/** A HashSet<String> of the jmx domain prefixes that need to be
@@ -137,6 +141,14 @@
serverDomains.add(domains[n]);
}
}
+ /**
+ *
+ * @param domain - the default domain when an MBean is
+ * registered with an ObjectName without a domain
+ * @param outer - the wrapping MBeanServer, passed to MBeans
+ * at registration.
+ * @param delegate the delegate to use for Notifications.
+ */
LazyMBeanServer(String domain, MBeanServer outer,
MBeanServerDelegate delegate)
{
@@ -370,7 +382,17 @@
public boolean isInstanceOf(ObjectName name, String className)
throws InstanceNotFoundException
{
- return getServer(name).isInstanceOf(name, className);
+ boolean isInstanceOf = false;
+ try
+ {
+ isInstanceOf = getServer(name).isInstanceOf(name, className);
+ }
+ catch(InstanceNotFoundException e)
+ {
+ reloadDomains();
+ isInstanceOf = getServer(name).isInstanceOf(name, className);
+ }
+ return isInstanceOf;
}
public Object instantiate(String className)
More information about the jboss-cvs-commits
mailing list