Description
Recent version of Java contain a JMX MBeanServer that can be requested by the ManagementFactory class.
If no other MBeanServer is running, you can have a look at the CentraSite Java management interface by registering the MBean by the MBeanServer of a Java process. Add the following three lines to the Java code:
MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
ObjectName csAdmin = new ObjectName("CentraSite:id=CentraSiteAdminImp");
mbs.createMBean("com.centrasite.jmx.admin.CentraSiteAdminImpl", csAdmin);
For correct operation of the MBean, the following points must be fulfilled:
The name of the MBean must be an ObjectName. In our case, it is
CentraSite:id=CentraSiteAdminImpThe CLASSPATH must include the following JAR files:
<CentraSiteInstallDir>/rts/jmx/CentraSiteJMXAdmin.jar
<CentraSiteInstallDir>/rts/jmx/CentraSiteJMXAdmin-L10N.jar
<CentraSiteInstallDir>/rts/jmx/CentraSiteAdminAPI.jar
<CentraSiteInstallDir>/rts/bin/inmUtil.jar
<CentraSiteInstallDir>/rts/bin/inmUtilConf.jar
<CentraSiteInstallDir>/rts/bin/log4j.jar
The PATH must include the following directory
<
CentraSiteInstallDir>/bin
Other system properties may be required, depending on the environment. For example, to use JConsole, the Java process must be started with the following Java system property:
-Dcom.sun.management.jmxremote
Note: | The above example shows how the CentraSite Java management interface works for the default MBean server of a JVM. In a production environment the integration in a MBean server may be different. |
The CentraSite Java management interface works with Java version 5.0.