如何配置 CXF Web 服务以便 Glassfish 可以监控它们
我们在 CXF 框架 实现的 Web 服务.java.net" rel="nofollow noreferrer">Glassfish 应用程序服务器。 Glassfish 可以通过其监控部署在服务器上的 Web 服务管理控制台。
我们希望能够将 Glassfish 的这些监控功能用于使用 CXF 实现的 Web 服务,但是当我们部署 Web 服务应用程序时,无法通过 Glassfish 管理控制台使用这些服务。
有谁知道如何配置 CXF Web 服务以便它们显示在 Glassfish 的管理控制台中?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有一些文档:
http://cxf.apache.org/docs/jmx- management.html
了解如何在 CXF 中启用 JMX 检测。然而,这里还缺少一些东西。在 2.2.3 及更新版本中,InstrumentationManagerImpl bean 上有一些新属性,可以告诉它不要创建新的 MBean 服务器和连接,并希望使用平台提供的内容。
<代码>
true
将只调用:
mbs = ManagementFactory.getPlatformMBeanServer();
这将有望获得默认的 GlassFish MBS。
不会创建新的连接器。
另外,如果您可以从 spring 上下文中获取 GlassFish MBS 的句柄(spring 可能有办法做到这一点),您可以将“server”属性设置为实际的 MBeanServer。
There are some docs at:
http://cxf.apache.org/docs/jmx-management.html
about how to enable the JMX instrumentation in CXF. There are a couple things missing there however. With 2.2.3 and newer, there are some new properties on the InstrumentationManagerImpl bean that can tell it to NOT create a new MBean server and connection and stuff an hopefully use the platform supplied one.
<usePlatformMBeanServer>true</usePlatformMBeanServer>
will just call:
mbs = ManagementFactory.getPlatformMBeanServer();
which will hopefully get the default GlassFish MBS.
<createMBServerConnectorFactory>false</createMBServerConnectorFactory>
would not create a new connector.
Also, if you can get a handle on the GlassFish MBS from the spring context, (spring probably has ways to do it), you can set the "server" property to the actual MBeanServer.