[dna-issues] [JBoss JIRA] Commented: (DNA-398) RepositoryNodeTypeManager is Not Thread-Safe
Randall Hauch (JIRA)
jira-events at lists.jboss.org
Thu May 7 10:44:46 EDT 2009
[ https://jira.jboss.org/jira/browse/DNA-398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12466291#action_12466291 ]
Randall Hauch commented on DNA-398:
-----------------------------------
Corrected the public getAllNodeTypes() method, which was returning the actually values collection associated with an internal map that is modified. This means that although the method atomically returns the collection in a thread-safe manner, the resulting collection is live and may be modified via other calls. The change is to create a defensive and immutable copy of the node types within the lock scope. Currently, this method is only called from the JcrNodeTypeManager implementation (the Session-specific wrapper around the shared RepositoryNodeTypeManager), which is not currently called from within any DNA JCR implementation code. Therefore, the cost of making a copy has little impact.
Also added JavaDoc for several public methods.
> RepositoryNodeTypeManager is Not Thread-Safe
> --------------------------------------------
>
> Key: DNA-398
> URL: https://jira.jboss.org/jira/browse/DNA-398
> Project: DNA
> Issue Type: Bug
> Components: JCR
> Affects Versions: 0.4
> Reporter: Brian Carothers
> Priority: Critical
> Fix For: 0.5
>
> Attachments: DNA-398.patch
>
>
> RTNM now allows type registration and is no longer immutable. At the moment, it is not even thread-safe which violates the -170 specification.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the dna-issues
mailing list