myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leonardo Uribe (JIRA)" <>
Subject [jira] Commented: (MYFACES-1578) WebXml class has thread-safety issue (AddResourceFactory reports ExtensionFilter not mapped)
Date Wed, 09 Apr 2008 22:50:04 GMT


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
> --------------------------------------------------------------------------------------------
>                 Key: MYFACES-1578
>                 URL:
>             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.

View raw message