Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-12829

An autocreated CXF Bus not shut down in CxfSpringEndpoint

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.21.3, 2.22.2, 2.23.0
    • Component/s: camel-cxf
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      CxfSpringEndpoint.setApplicationContext(ApplicationContext) creates a org.apache.cxf.Bus [1] whose shutdown() method is never called. This is one of the causes for a memory leak in WildFly Camel (WFC) [2].

      The steps to reproduce for WFC are as follows:

      1. Start the WFC
      2. run the CXFWSConsumerIntegrationTest several times
      3. Force GC on WFC
      4. Get a heap dump
      NOT OK: There are as many stale SpringBus instances as many times the test was run.
      Expected: no SpringBus instances there

      [1] https://github.com/apache/camel/blob/c69affc49415b190645ce25536ffd62348c4fe34/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfSpringEndpoint.java#L251
      [2] https://github.com/wildfly-extras/wildfly-camel/issues/2649

        Attachments

          Activity

            People

            • Assignee:
              ppalaga Peter Palaga
              Reporter:
              ppalaga Peter Palaga
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: