[
https://issues.apache.org/struts/browse/TILES-204?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dirk Alexander Schaefer updated TILES-204:
------------------------------------------
Description:
hello all,
consider the following: tiles is initialized using the
org.apache.tiles.definition.UrlDefinitionsFactory default definitions factory.
now, when a request receives and the tiles container is instructed to render a
specific tiles definition, the following happens (the interessing parts):
1. invoke 'Definition getDefinition(String name, TilesRequestContext
tilesContext)' of UrlDefinitionFactory.
2. from there invoke 'Definitions getDefinitions()' of UrlDefinitionFactory.
3. if the instance attribute 'definitions' is null, from there invoke
'Definitions readDefinitions()' of UrlDefinitionFactory.
within the third call the configuration is actually parsed and the
beans/instances/what ever defined within the configuration file(s) are getting
created.
unfortunatelly the UrlDefinitionFactory does not synchronize the call to the
'Definitions readDefinitions()' method. the result is, if there are multiple
request reaching the servlet container at once and there has no other request
been received so long, we get into classical multithreading problematics where
each thread is bothering the others and the process of creating the definitions
list crashs.
greez,
dialsc
was:
hello all,
consider the following: tiles is initialized using the
org.apache.tiles.definition.UrlDefinitionsFactory default definitions factory.
now, when a request receives and the tiles container is instructed to render a
specific tiles definition, the following happens (the interessing parts):
1. invoke 'Definition getDefinition(String name, TilesRequestContext
tilesContext)' of UrlDefinitionFactory.
2. from there invoke 'Definitions getDefinitions()' of UrlDefinitionFactory.
3. if the instance attribute 'definitions' is null, from there invoke
'Definitions readDefinitions()' of UrlDefinitionFactory.
within the third call the configuration is actually parsed and the
beans/instances/what ever defined within the configuration file(s) are getting
created.
unfortunatelly the UrlDefinitionFactory does not synchronize the call to the
'Definitions readDefinitions()' method. the result is, if there are multiple
request reaching the servlet container at once and there has no other request
been received so long, we get into classical multithreading problematics where
each thread is bothering the others and the process of creating the definitions
list crashs.
can anyone confirm this?
greez,
dialsc
> UrlDefinitionFactory crashs during getDefinitions on multiple requests
> ----------------------------------------------------------------------
>
> Key: TILES-204
> URL: https://issues.apache.org/struts/browse/TILES-204
> Project: Tiles
> Issue Type: Bug
> Components: tiles-core
> Affects Versions: 2.0.4
> Environment: tomcat 5.5
> Reporter: Dirk Alexander Schaefer
> Priority: Critical
>
> hello all,
> consider the following: tiles is initialized using the
> org.apache.tiles.definition.UrlDefinitionsFactory default definitions factory.
> now, when a request receives and the tiles container is instructed to render
> a specific tiles definition, the following happens (the interessing parts):
> 1. invoke 'Definition getDefinition(String name, TilesRequestContext
> tilesContext)' of UrlDefinitionFactory.
> 2. from there invoke 'Definitions getDefinitions()' of
> UrlDefinitionFactory.
> 3. if the instance attribute 'definitions' is null, from there invoke
> 'Definitions readDefinitions()' of UrlDefinitionFactory.
> within the third call the configuration is actually parsed and the
> beans/instances/what ever defined within the configuration file(s) are
> getting created.
> unfortunatelly the UrlDefinitionFactory does not synchronize the call to the
> 'Definitions readDefinitions()' method. the result is, if there are multiple
> request reaching the servlet container at once and there has no other request
> been received so long, we get into classical multithreading problematics
> where each thread is bothering the others and the process of creating the
> definitions list crashs.
> greez,
> dialsc
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.