Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.2.6, 2.2.7
-
None
-
Moderate
Description
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:
final EndpointImpl ep = new SpringEndpointImpl( this.bus, implementor); ep.setAddress(address); ep.publish();
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.