You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Mikael Andersson Wigander (Jira)" <ji...@apache.org> on 2021/11/26 07:53:00 UTC

[jira] [Commented] (CAMEL-17181) camel-core - XPathBuilder never clears pool when using @XPath annotation and grows pool causing memory leak

    [ https://issues.apache.org/jira/browse/CAMEL-17181?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17449435#comment-17449435 ] 

Mikael Andersson Wigander commented on CAMEL-17181:
---------------------------------------------------

Just for my curiousity, the doStop() method in XPathBuilder.class is never executed it seems. 

In that method the Queues pool and poolLogNamespaces are clear

{code:java}
@Override
    public void doStop() throws Exception {
        pool.clear();
        poolLogNamespaces.clear();
    }
{code}

Shouldn't it be called from somewhere in Camel?

> camel-core - XPathBuilder never clears pool when using @XPath annotation and grows pool causing memory leak
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-17181
>                 URL: https://issues.apache.org/jira/browse/CAMEL-17181
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 3.11.3, 3.12.0
>            Reporter: Mikael Andersson Wigander
>            Assignee: Claus Ibsen
>            Priority: Major
>             Fix For: 3.7.7, 3.11.4, 3.14.0
>
>         Attachments: FULINS_I_20211106_01of01.zip
>
>
> When using *@XPath()* annotations to bean method parameters, *XPathBuilder* is used and expressions are added to a pool in the *init()* method of the class.
> These expressions are keep adding up but they are never cleared.
> There's a method *doStop()* which has the code for cleaning but it is never used, hence a leakage of XPathExpressions.
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)