views:

232

answers:

1

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?

+2  A: 

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.

Daniel Kulp