简体   繁体   中英

How to configure CXF web services so that Glassfish can monitor them

We deploy web services implemented by using the CXF framework on the Glassfish application server. Glassfish has the possibility to monitor Web Services deployed on the server through it's management console.

We would like to be able to use these monitor features of Glassfish towards the web services implemented by using CXF, but when we deploy the web service application, the services isn't available through the Glassfish management console.

Does anyone know how to configure the CXF web services so they show up in Glassfish's management console?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM