[jboss-cvs] JBossAS SVN: r59167 - branches/Branch_4_2/system/src/main/org/jboss/system/server/jmx
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Dec 19 20:54:59 EST 2006
Author: scott.stark at jboss.org
Date: 2006-12-19 20:54:57 -0500 (Tue, 19 Dec 2006)
New Revision: 59167
Modified:
branches/Branch_4_2/system/src/main/org/jboss/system/server/jmx/LazyMBeanServer.java
Log:
JBAS-3947, reload the server domains on InstanceNotFoundException failures in isInstanceOf calls.
Modified: branches/Branch_4_2/system/src/main/org/jboss/system/server/jmx/LazyMBeanServer.java
===================================================================
--- branches/Branch_4_2/system/src/main/org/jboss/system/server/jmx/LazyMBeanServer.java 2006-12-20 01:46:31 UTC (rev 59166)
+++ branches/Branch_4_2/system/src/main/org/jboss/system/server/jmx/LazyMBeanServer.java 2006-12-20 01:54:57 UTC (rev 59167)
@@ -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