Software AG Products 10.7 | CentraSite for Developers | Java Management Interface | Introduction to Java Management Interface
 
Introduction to Java Management Interface
Use the CentraSite Java Management Interface to manage the CentraSite Registry or Repository. With the CentraSite Java Management Interface, you can:
*Monitor certain parameters of the CentraSite Registry or Repository.
*Change certain parameters of the CentraSite Registry or Repository. CentraSite parameters are known here as attributes.
*Perform operations such as starting and stopping the CentraSite Registry or Repository.
The JMX-based CentraSite Java management Interface is provided as an open MBean (managed bean) that interfaces to CentraSite.
To activate the CentraSite Java Management Interface, the MBean must be registered in an MBeanServer, which must run on the same host as the CentraSite Registry or Repository.
The CentraSite Java management interface is based on the Java Management Extensions (JMX) standard and the Java Management Extensions so that it can be used with JMX MBeanServers that are based on this standard.
Recent version of Java contains 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=CentraSiteAdminImp
*The CLASSPATH must include the following JAR files:
<CentraSiteInstall_Directory>/rts/jmx/CentraSiteJMXAdmin.jar
<CentraSiteInstall_Directory>/rts/jmx/CentraSiteJMXAdmin-L10N.jar
<CentraSiteInstall_Directory>/rts/jmx/CentraSiteAdminAPI.jar
<CentraSiteInstall_Directory>/rts/bin/inmUtil.jar
<CentraSiteInstall_Directory>/rts/bin/inmUtilConf.jar
<CentraSiteInstall_Directory>/rts/bin/log4j.jar
*The PATH must include the <CentraSiteInstall_Directory>/bin directory.
*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.