本文整理汇总了Java中org.springframework.jmx.support.MBeanRegistrationSupport类的典型用法代码示例。如果您正苦于以下问题:Java MBeanRegistrationSupport类的具体用法?Java MBeanRegistrationSupport怎么用?Java MBeanRegistrationSupport使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MBeanRegistrationSupport类属于org.springframework.jmx.support包,在下文中一共展示了MBeanRegistrationSupport类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: DynamicMBeanExporter
import org.springframework.jmx.support.MBeanRegistrationSupport; //导入依赖的package包/类
/**
* Instantiates a new dynamic MBean exporter.
*/
public DynamicMBeanExporter()
{
// For consistency, try to continue to use the last MBeanServer used in the same thread
MBeanServer server = threadServer.get();
if (server != null)
{
setServer(server);
}
// Make replace existing the default registration behavior
setRegistrationBehavior(MBeanRegistrationSupport.REGISTRATION_REPLACE_EXISTING);
setAutodetectMode(MBeanExporter.AUTODETECT_NONE);
}
示例2: MBeanExporter
import org.springframework.jmx.support.MBeanRegistrationSupport; //导入依赖的package包/类
public MBeanExporter() {
setAssembler(new AnnotationMBeanInfoAssembler());
// hack logging
try {
Field loggerField = MBeanRegistrationSupport.class.getDeclaredField("logger");
loggerField.setAccessible(true);
loggerField.set(this, LogFactory.getLog(org.springframework.jmx.export.MBeanExporter.class));
} catch (NoSuchFieldException | IllegalAccessException ignore) {
}
}