If one publishes a service using the JAX-WS APIs or directly using the CXF implementation classes of Endpoint as show in the following code snippet:
the created CXF entities register an MBean for the published endpoint if CXF is configured with an MBean server. If Endpoint.stop() is later called on the JAX-WS Endpoint implementation class, the MBean is not unregistered. Additionally, the Endpoint can be republished after being stopped by calling Endpoint.publish(...) again. This ability to republish the Endpoint violates the JAX-WS API and not unregistering the MBean when a terminal stop on the Endpoint has been performed leaves dangling MBeans that impact accurate monitoring and can allow the reactivation of a stopped endpoint that may no longer be accurately configured. Leaving the MBean that contains strong references to the JAX-WS Endpoint and implementation classes can delay or prevent GC of deactivated and unused resources.