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

XPathBuilder doesn't clear ThreadLocal with exchange after evaluation

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.7.0
    • Fix Version/s: 2.8.0
    • Component/s: camel-core
    • Labels:

      Description

      XPathBuilder doesn't clear ThreadLocal with exchange (and variableResolver) after evaluation. In such case reference to current exchange (and body, headers, properties, etc.) remains in Thread until current thread dies or evaluates new exchange with the same XPathBuilder instance.

      The result of this is that each thread can contain references to multiple exchanges (up to the number of xpaths in camel context), that can't be collected by GC.

        Attachments

        1. bug_reproduction.patch
          2 kB
          Marcin Kolda

          Activity

            People

            • Assignee:
              davsclaus Claus Ibsen
              Reporter:
              marcin kolda Marcin Kolda
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: