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

XPathBuilder doesn't clear ThreadLocal with exchange after evaluation

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.7.0
    • 2.8.0
    • camel-core

    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

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

            Dates

              Created:
              Updated:
              Resolved: