[ 
http://www.stripesframework.org/jira/browse/STS-843?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ben Gunter resolved STS-843.
----------------------------

    Resolution: Fixed

> DynamicMappingFilter may create multiple instances of StripesFilter
> -------------------------------------------------------------------
>
>                 Key: STS-843
>                 URL: http://www.stripesframework.org/jira/browse/STS-843
>             Project: Stripes
>          Issue Type: Bug
>    Affects Versions: Release 1.5.6
>         Environment: Tomcat 5.5, Java 1.6, Stripes 1.5.6
>            Reporter: Peter Štibraný
>            Assignee: Ben Gunter
>             Fix For: Release 1.5.7
>
>
> Our web.xml does NOT have StripesFilter, but it does have 
> DynamicMappingFilter (DMF) with configuration for StripesFilter.
> When DMF finds that there is no StripesFilter in servlet context, it tries to 
> create its own:
>             // Get a reference to a StripesFilter instance
>             StripesFilter sf = getStripesFilter();
>             if (sf == null) {
>                 initStripesFilter((HttpServletRequest) request, wrapper);
>                 sf = getStripesFilter();
>             }
> Problem may occur when multiple threads execute this code at once. They all 
> find that getStripesFilter() returns null, and go ahead to 
> initStripesFilter(). This method is synchronized, but it doesn't check if 
> filter wasn't already created by other thread. So it happily creates new 
> StripesFilter, possibly for second or third time :-( This later causes 
> problem in StripesFilter.getConfiguration() method when called outside of 
> stripes-action. Stripes.getConfiguration() if there is only single 
> configuration, and if it finds multiple configs, it throws exception :-(

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

       

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to