CXF does not unregister Endpoint MBeans for JAX-WS API published endpoints when endpoint is stopped through JAX-WS API ----------------------------------------------------------------------------------------------------------------------
Key: CXF-2740 URL: https://issues.apache.org/jira/browse/CXF-2740 Project: CXF Issue Type: Bug Components: JAX-WS Runtime Affects Versions: 2.2.7, 2.2.6 Reporter: David Valeri 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: {code} final EndpointImpl ep = new SpringEndpointImpl( this.bus, implementor); ep.setAddress(address); ep.publish(); {code} 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. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.