• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java MBeanExportException类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.springframework.jmx.export.MBeanExportException的典型用法代码示例。如果您正苦于以下问题:Java MBeanExportException类的具体用法?Java MBeanExportException怎么用?Java MBeanExportException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



MBeanExportException类属于org.springframework.jmx.export包,在下文中一共展示了MBeanExportException类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: registerEndpoint

import org.springframework.jmx.export.MBeanExportException; //导入依赖的package包/类
protected void registerEndpoint(String beanName, Endpoint<?> endpoint) {
	@SuppressWarnings("rawtypes")
	Class<? extends Endpoint> type = endpoint.getClass();
	if (AnnotationUtils.findAnnotation(type, ManagedResource.class) != null) {
		// Already managed
		return;
	}
	if (type.isMemberClass()
			&& AnnotationUtils.findAnnotation(type.getEnclosingClass(),
					ManagedResource.class) != null) {
		// Nested class with @ManagedResource in parent
		return;
	}
	try {
		registerBeanNameOrInstance(getEndpointMBean(beanName, endpoint), beanName);
	}
	catch (MBeanExportException ex) {
		logger.error("Could not register MBean for endpoint [" + beanName + "]", ex);
	}
}
 
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:21,代码来源:EndpointMBeanExporter.java


示例2: registerFeatureManagers

import org.springframework.jmx.export.MBeanExportException; //导入依赖的package包/类
private void registerFeatureManagers(ApplicationContext ctx, SchemaManager sMgr) throws MBeanExportException, MalformedObjectNameException {
    ClientManagement cMgr = ctx.getBean("clientManager", ClientManagement.class);
    cMgr.setSchemaManager(sMgr);
	mbeanExporter.registerManagedResource(cMgr, cMgr.getObjectName());
    DocumentManagement dMgr = ctx.getBean("docManager", DocumentManagement.class);
    dMgr.setSchemaManager(sMgr);
	mbeanExporter.registerManagedResource(dMgr, dMgr.getObjectName());
    IndexManagement iMgr = ctx.getBean("indexManager", IndexManagement.class);
    iMgr.setSchemaManager(sMgr);
	mbeanExporter.registerManagedResource(iMgr, iMgr.getObjectName());
    TriggerManagement trMgr = ctx.getBean("triggerManager", TriggerManagement.class);
    trMgr.setSchemaManager(sMgr);
	mbeanExporter.registerManagedResource(trMgr, trMgr.getObjectName());
	ModelManagement mMgr = ctx.getBean("modelManager", ModelManagement.class);
    mMgr.setSchemaManager(sMgr);
	mbeanExporter.registerManagedResource(mMgr, mMgr.getObjectName());
    QueryManagement qMgr = ctx.getBean("queryManager", QueryManagement.class);
    qMgr.setSchemaManager(sMgr);
	mbeanExporter.registerManagedResource(qMgr, qMgr.getObjectName());
	TransactionManagement tMgr = ctx.getBean("transManager", TransactionManagement.class);
    tMgr.setSchemaManager(sMgr);
	mbeanExporter.registerManagedResource(tMgr, tMgr.getObjectName());
    ResourceManagement rMgr = ctx.getBean("resourceManager", ResourceManagement.class);
    rMgr.setSchemaManager(sMgr);
	mbeanExporter.registerManagedResource(rMgr, rMgr.getObjectName());
}
 
开发者ID:dsukhoroslov,项目名称:bagri,代码行数:27,代码来源:SchemaManagement.java


示例3: registerMBean

import org.springframework.jmx.export.MBeanExportException; //导入依赖的package包/类
protected void registerMBean(ObjectName oname, Object target, String beanName)
{
	try
	{
		// For some reason, we some objects (notably controllers) get registered 2-3 times. Subsequent registrations throw exceptions.
		// unregisterManagedResource() is very tolerant and won't blow up if the object isn't registered.
		// With this "last one wins" strategy, your dev environment stays clean when JRebel reloads the web context.
		mbeanExporter.unregisterManagedResource(oname);
		mbeanExporter.registerManagedResource(target, oname);
		logger.info("Exported " + beanName + " to JMX as " + oname.toString());
	}
	catch(MBeanExportException e)
	{
		logger.warn("Error registering MBean [" + oname + "]; cause: [" + e.getCause() + "]");
	}
}
 
开发者ID:kenwdelong,项目名称:stability-utils,代码行数:17,代码来源:JmxExportingAspectPostProcessor.java


示例4: entryAdded

import org.springframework.jmx.export.MBeanExportException; //导入依赖的package包/类
@Override
public void entryAdded(EntryEvent<String, E> event) {
	logger.trace("entryAdded; event: {}", event);
	String entityName = event.getKey();
	try {
		initEntityManager(entityName);
	} catch (MBeanExportException | MalformedObjectNameException ex) {
		// JMX registration failed.
		logger.error("entryAdded.error: ", ex);
	}
}
 
开发者ID:dsukhoroslov,项目名称:bagri,代码行数:12,代码来源:EntityManagement.java


示例5: createAndConfigureMBean

import org.springframework.jmx.export.MBeanExportException; //导入依赖的package包/类
@Override
public ModelMBean createAndConfigureMBean(Object managedResource, String beanKey) throws MBeanExportException
{
  return super.createAndConfigureMBean(managedResource, beanKey);
}
 
开发者ID:iisi-nj,项目名称:GemFireLite,代码行数:6,代码来源:GemliteMBeanExporter.java


示例6: registerManagedResource

import org.springframework.jmx.export.MBeanExportException; //导入依赖的package包/类
@Override
public void registerManagedResource(Object arg0, ObjectName arg1)
		throws MBeanExportException {
	// no-op
}
 
开发者ID:betfair,项目名称:cougar,代码行数:6,代码来源:MockMBeanExporter.java



注:本文中的org.springframework.jmx.export.MBeanExportException类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Texture类代码示例发布时间:2022-05-22
下一篇:
Java UriParser类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap