[
https://issues.apache.org/jira/browse/MYFACES-1578?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12587414#action_12587414
]
Leonardo Uribe commented on MYFACES-1578:
-----------------------------------------
Checking this bug I have found that the conditions (WebXml as singleton and
synchronized method) was solved.
Actually, the WebXml instance is placed in the application map and there is a
code that handle thread problem in AddResourceFactory.checkEnvironment.
Since the only part where this method is called is in tomahawk, this issue
should be closed.
> WebXml class has thread-safety issue (AddResourceFactory reports
> ExtensionFilter not mapped)
> --------------------------------------------------------------------------------------------
>
> Key: MYFACES-1578
> URL: https://issues.apache.org/jira/browse/MYFACES-1578
> Project: MyFaces Core
> Issue Type: Bug
> Reporter: Simon Kitching
> Assignee: Leonardo Uribe
>
> In trunk of shared module, class o.a.m.shared.webapp.webxml.WebXml is a
> singleton (instance placed in the application map) but it does not
> synchronize access to its members.
> For example, when the object is first created and stored into the application
> map on startup, member _facesExtensionsFilterMappings is null. When a later
> call comes in to method getFacesExtensionsFilterMappings() on the singleton
> instance and it is discovered that the value is null a new array is created
> and populated. However this method does not protect against race condtions in
> any way, so two requests that pass through the ExtensionsFilter can be
> executing this code concurrently, with potentially nasty effects.
> We have a load test that is actually experiencing intermittent exceptions
> when run against a freshly-started webapp. The exception is actually in
> AddResourceFactory.checkEnvironment, where it complains that there is no
> mapping for the ExtensionFilter, and the thread-race above could well be the
> cause.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.