[dna-issues] [JBoss JIRA] Updated: (DNA-335) DNA's NodeTypeManager implementation does not allow multiple definitions with the same name

Randall Hauch (JIRA) jira-events at lists.jboss.org
Mon Mar 23 15:45:22 EDT 2009


     [ https://jira.jboss.org/jira/browse/DNA-335?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Randall Hauch updated DNA-335:
------------------------------

    Attachment: dna-335-definitionsWithSameName.patch


Attached a patch file that contains the set of changes to handle multiple property definitions with the same name, and multiple child node definitions with the same name.  The patch also corrects and centralizes the logic of selecting the "best" property definition (given the name, values, etc.) and "best" child node definition (given the names, primary type, number of children with the same name, etc.).  The JcrNodeType now maintains a cache of various definitions keyed by their name, since searching by name is by far the most frequently used mechanism to access definitions.

> DNA's NodeTypeManager implementation does not allow multiple definitions with the same name
> -------------------------------------------------------------------------------------------
>
>                 Key: DNA-335
>                 URL: https://jira.jboss.org/jira/browse/DNA-335
>             Project: DNA
>          Issue Type: Bug
>            Reporter: Randall Hauch
>         Attachments: dna-335-definitionsWithSameName.patch
>
>
> The JCR Specification (version 1.0.1) does not preclude that there may be multiple property definitions with the same name, or that there may be multiple child definitions with the same name.  JCR 1.0 (version 1.0.1) DOES say that there may be multiple residual definitions with the same name.  However, the draft version of the JSR-283 specification does have a new section 4.7.15 that specifically addresses and allows multiple definitions with the same name, as long as they are distinguishable from the other definitions with the same name (for property definitions, this means the type must be different; for child node definitions, this means the required primary types attribute).
> There are a number of places where the logic is expecting a single property definition (or child definition) given a node type and a definition name.  This is obviously flawed.  Also, our logic to select the "best" property definition or "best" child node definition doesn't seem to be correct, in that it tends to favor less-restricted definitions that are lower in the type hierarchy rather than very good matching definitions higher in the type hierarchy.

-- 
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