[Jboss-cvs] JBossAS SVN: r55476 - in branches/MC_VDF_WORK/system-jmx/src/main/org/jboss/system/server: . jmx
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Aug 9 23:27:11 EDT 2006
Author: scott.stark at jboss.org
Date: 2006-08-09 23:27:08 -0400 (Wed, 09 Aug 2006)
New Revision: 55476
Modified:
branches/MC_VDF_WORK/system-jmx/src/main/org/jboss/system/server/ServerImpl.java
branches/MC_VDF_WORK/system-jmx/src/main/org/jboss/system/server/jmx/JMXKernel.java
Log:
Update the ServerConfig usage to employ a ServerConfigImpl wrapper for the mbean
Modified: branches/MC_VDF_WORK/system-jmx/src/main/org/jboss/system/server/ServerImpl.java
===================================================================
--- branches/MC_VDF_WORK/system-jmx/src/main/org/jboss/system/server/ServerImpl.java 2006-08-10 03:26:25 UTC (rev 55475)
+++ branches/MC_VDF_WORK/system-jmx/src/main/org/jboss/system/server/ServerImpl.java 2006-08-10 03:27:08 UTC (rev 55476)
@@ -179,7 +179,7 @@
// Setup URL handlers - do this before initializing the ServerConfig
initURLHandlers();
- config.initURLs();
+ baseConfig.initURLs();
log.info("Starting JBoss (MX MicroKernel)...");
Modified: branches/MC_VDF_WORK/system-jmx/src/main/org/jboss/system/server/jmx/JMXKernel.java
===================================================================
--- branches/MC_VDF_WORK/system-jmx/src/main/org/jboss/system/server/jmx/JMXKernel.java 2006-08-10 03:26:25 UTC (rev 55475)
+++ branches/MC_VDF_WORK/system-jmx/src/main/org/jboss/system/server/jmx/JMXKernel.java 2006-08-10 03:27:08 UTC (rev 55476)
@@ -54,6 +54,7 @@
import org.jboss.system.ServiceControllerMBean;
import org.jboss.system.server.Server;
import org.jboss.system.server.ServerConfig;
+import org.jboss.system.server.ServerConfigImpl;
import org.jboss.system.server.ServerConfigImplMBean;
import org.jboss.system.server.ServerImplMBean;
import org.jboss.util.JBossObject;
@@ -79,6 +80,7 @@
private Server serverImpl;
private ServiceController controller;
private ServerConfig serverConfig;
+ private ServerConfigImplMBean serverConfigMBean;
/** The NotificationBroadcaster implementation delegate */
private JBossNotificationBroadcasterSupport broadcasterSupport;
@@ -110,12 +112,14 @@
{
long start = System.currentTimeMillis();
+ ClassLoader tcl = Thread.currentThread().getContextClassLoader();
// Create the MBeanServer
String builder = System.getProperty(ServerConstants.MBEAN_SERVER_BUILDER_CLASS_PROPERTY,
ServerConstants.DEFAULT_MBEAN_SERVER_BUILDER_CLASS);
System.setProperty(ServerConstants.MBEAN_SERVER_BUILDER_CLASS_PROPERTY, builder);
serverConfig = serverImpl.getConfig();
+ serverConfigMBean = new ServerConfigImpl(serverConfig);
// Check if we'll use the platform MBeanServer or instantiate our own
if (serverConfig.getPlatformMBeanServer() == true)
{
@@ -151,26 +155,33 @@
// Set ServiceClassLoader as classloader for the construction of
// the basic system
- Thread.currentThread().setContextClassLoader(ucl);
-
- // General Purpose Architecture information
- createMBean("org.jboss.system.mbeanServer.ServerInfo",
- "jboss.system:type=ServerInfo");
-
- // Service Controller
- controller = new ServiceController();
- controller.setKernel(kernelContext.getKernel());
- controller.setMBeanServer(mbeanServer);
- mbeanServer.registerMBean(controller, new ObjectName("jboss.system:service=ServiceController"));
-
- log.info("Legacy JMX core initialized");
- started = true;
- long end = System.currentTimeMillis();
-
- // Send a notification that the startup is complete
- Notification msg = new Notification(Server.START_NOTIFICATION_TYPE, this, 1);
- msg.setUserData(new Long(end - start));
- sendNotification(msg);
+ try
+ {
+ Thread.currentThread().setContextClassLoader(ucl);
+
+ // General Purpose Architecture information
+ createMBean("org.jboss.system.mbeanServer.ServerInfo",
+ "jboss.system:type=ServerInfo");
+
+ // Service Controller
+ controller = new ServiceController();
+ controller.setKernel(kernelContext.getKernel());
+ controller.setMBeanServer(mbeanServer);
+ mbeanServer.registerMBean(controller, new ObjectName("jboss.system:service=ServiceController"));
+
+ log.info("Legacy JMX core initialized");
+ started = true;
+ long end = System.currentTimeMillis();
+
+ // Send a notification that the startup is complete
+ Notification msg = new Notification(Server.START_NOTIFICATION_TYPE, this, 1);
+ msg.setUserData(new Long(end - start));
+ sendNotification(msg);
+ }
+ finally
+ {
+ Thread.currentThread().setContextClassLoader(tcl);
+ }
}
/**
More information about the jboss-cvs-commits
mailing list