You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Felix Meschberger (JIRA)" <ji...@apache.org> on 2010/11/10 15:21:13 UTC
[jira] Created: (SLING-1871) JcrResourceBundle.loadFully not thread
safe
JcrResourceBundle.loadFully not thread safe
-------------------------------------------
Key: SLING-1871
URL: https://issues.apache.org/jira/browse/SLING-1871
Project: Sling
Issue Type: Improvement
Components: Extensions
Reporter: Felix Meschberger
The JcrResourceBundle.loadFully method is intended to ensure the resource bundle is fully loaded (used by the getKeys() method).
This method is not currently thread safe in that it writes into the resources (cache) map unsynchronized which may cause map corruption and thus endless loops.
While fixing this method, we should also overwrite the Java 1.6 ResourceBundle method handleKeySet() which is used by the new keySet() method. The default implementation creates its own cache of keys, which duplicates the resource properties map of the JcrResourceBundle class.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (SLING-1871) JcrResourceBundle.loadFully not thread
safe
Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-1871?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Carsten Ziegeler closed SLING-1871.
-----------------------------------
> JcrResourceBundle.loadFully not thread safe
> -------------------------------------------
>
> Key: SLING-1871
> URL: https://issues.apache.org/jira/browse/SLING-1871
> Project: Sling
> Issue Type: Improvement
> Components: Extensions
> Affects Versions: I18n 2.0.2
> Reporter: Felix Meschberger
> Assignee: Felix Meschberger
> Fix For: I18n 2.0.4
>
>
> The JcrResourceBundle.loadFully method is intended to ensure the resource bundle is fully loaded (used by the getKeys() method).
> This method is not currently thread safe in that it writes into the resources (cache) map unsynchronized which may cause map corruption and thus endless loops.
> While fixing this method, we should also overwrite the Java 1.6 ResourceBundle method handleKeySet() which is used by the new keySet() method. The default implementation creates its own cache of keys, which duplicates the resource properties map of the JcrResourceBundle class.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (SLING-1871) JcrResourceBundle.loadFully not thread
safe
Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-1871?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Felix Meschberger updated SLING-1871:
-------------------------------------
Affects Version/s: I18n 2.0.2
Fix Version/s: I18n 2.0.4
> JcrResourceBundle.loadFully not thread safe
> -------------------------------------------
>
> Key: SLING-1871
> URL: https://issues.apache.org/jira/browse/SLING-1871
> Project: Sling
> Issue Type: Improvement
> Components: Extensions
> Affects Versions: I18n 2.0.2
> Reporter: Felix Meschberger
> Assignee: Felix Meschberger
> Fix For: I18n 2.0.4
>
>
> The JcrResourceBundle.loadFully method is intended to ensure the resource bundle is fully loaded (used by the getKeys() method).
> This method is not currently thread safe in that it writes into the resources (cache) map unsynchronized which may cause map corruption and thus endless loops.
> While fixing this method, we should also overwrite the Java 1.6 ResourceBundle method handleKeySet() which is used by the new keySet() method. The default implementation creates its own cache of keys, which duplicates the resource properties map of the JcrResourceBundle class.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (SLING-1871) JcrResourceBundle.loadFully not
thread safe
Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-1871?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Felix Meschberger resolved SLING-1871.
--------------------------------------
Resolution: Fixed
Assignee: Felix Meschberger
Rev. 1033507: Use a ConcurrentHashMap to store the resources to make access thread safe. In addition synchronize on the JcrResourceBundle instance when doing the full load to prevent excess load on the system. Finally implement the Java 6 handleKeySet() method to just return the key set view of the fully loaded resources.
> JcrResourceBundle.loadFully not thread safe
> -------------------------------------------
>
> Key: SLING-1871
> URL: https://issues.apache.org/jira/browse/SLING-1871
> Project: Sling
> Issue Type: Improvement
> Components: Extensions
> Reporter: Felix Meschberger
> Assignee: Felix Meschberger
>
> The JcrResourceBundle.loadFully method is intended to ensure the resource bundle is fully loaded (used by the getKeys() method).
> This method is not currently thread safe in that it writes into the resources (cache) map unsynchronized which may cause map corruption and thus endless loops.
> While fixing this method, we should also overwrite the Java 1.6 ResourceBundle method handleKeySet() which is used by the new keySet() method. The default implementation creates its own cache of keys, which duplicates the resource properties map of the JcrResourceBundle class.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.