Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-2740

CXF does not unregister Endpoint MBeans for JAX-WS API published endpoints when endpoint is stopped through JAX-WS API

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.6, 2.2.7
    • Fix Version/s: 2.2.8, 2.3
    • Component/s: JAX-WS Runtime
    • Labels:
      None
    • Estimated Complexity:
      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.

        Attachments

        1. CXF-2740.patch
          20 kB
          David Valeri

          Activity

            People

            • Assignee:
              davaleri David Valeri
              Reporter:
              davaleri David Valeri
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: