[
http://www.stripesframework.org/jira/browse/STS-843?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ben Gunter updated STS-843:
---------------------------
Fix Version/s: Release 1.5.7
Assignee: Ben Gunter
> 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
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development