You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Matt Benson (JIRA)" <ji...@apache.org> on 2011/06/07 22:49:59 UTC

[jira] [Resolved] (JXPATH-141) FunctionLibrary Multithreading issue

     [ https://issues.apache.org/jira/browse/JXPATH-141?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matt Benson resolved JXPATH-141.
--------------------------------

    Resolution: Fixed

Committed revision 1133155.


> FunctionLibrary Multithreading issue
> ------------------------------------
>
>                 Key: JXPATH-141
>                 URL: https://issues.apache.org/jira/browse/JXPATH-141
>             Project: Commons JXPath
>          Issue Type: Improvement
>    Affects Versions: 1.2 Final
>         Environment: All
>            Reporter: Cédric Opfermann
>             Fix For: 1.4
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> I have only one FunctionLibrary which is shared between all thread of my application.
> When I execute the getFunction method for the first time, the cache is prepared. But if many thread access the function for first time during the cache creation, there is a problem because the byNamespace variable is not null but still empty.
> The first solution would be to synchronize the getFunction method or to add a synchronized block around the prepare cache method call.
> What do you think about that ?
> Regards,

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira