1 5 package org.exoplatform.container.monitor.jvm.v15; 6 7 import java.lang.management.ManagementFactory ; 8 import org.exoplatform.container.RootContainer; 9 import org.exoplatform.container.RootContainerInitializer; 10 import org.exoplatform.container.monitor.jvm.JVMRuntimeInfo; 11 16 public class JVM15RootContainerInitializer implements RootContainerInitializer { 17 18 public void initialize(RootContainer container) { 19 container.registerComponentInstance(ManagementFactory.getOperatingSystemMXBean()) ; 20 container.registerComponentInstance(ManagementFactory.getRuntimeMXBean()) ; 21 container.registerComponentInstance(ManagementFactory.getThreadMXBean()) ; 22 container.registerComponentInstance(ManagementFactory.getClassLoadingMXBean()) ; 23 container.registerComponentInstance(ManagementFactory.getCompilationMXBean()) ; 24 25 container.registerComponentInstance(new MemoryInfo()) ; 26 container.registerComponentInstance(JVMRuntimeInfo.MEMORY_MANAGER_MXBEANS, ManagementFactory.getMemoryManagerMXBeans()) ; 27 container.registerComponentInstance(JVMRuntimeInfo.MEMORY_POOL_MXBEANS, ManagementFactory.getMemoryPoolMXBeans()) ; 28 container.registerComponentInstance(JVMRuntimeInfo.GARBAGE_COLLECTOR_MXBEANS, ManagementFactory.getGarbageCollectorMXBeans()) ; 29 } 30 } | Popular Tags |