List of usage examples for org.springframework.jmx.export MBeanExporter AUTODETECT_ASSEMBLER
int AUTODETECT_ASSEMBLER
To view the source code for org.springframework.jmx.export MBeanExporter AUTODETECT_ASSEMBLER.
Click Source Link
From source file:co.paralleluniverse.common.spring.SpringContainerHelper.java
private static BeanDefinition getMBeanExporterBeanDefinition(String defaultDomain) { final AnnotationJmxAttributeSource annotationSource = new AnnotationJmxAttributeSource(); final GenericBeanDefinition bean = new GenericBeanDefinition(); bean.setBeanClass(MBeanExporter.class); MutablePropertyValues properties = new MutablePropertyValues(); properties.add("server", ManagementFactory.getPlatformMBeanServer()); properties.add("autodetectMode", MBeanExporter.AUTODETECT_ASSEMBLER); properties.add("assembler", new MetadataMBeanInfoAssembler(annotationSource)); properties.add("namingStrategy", new MBeanNamingStrategy(annotationSource).setDefaultDomain(defaultDomain)); bean.setPropertyValues(properties);/*w w w . ja va2s .c o m*/ return bean; }