jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting (JIRA)" <j...@apache.org>
Subject [jira] Created: (JCR-2330) Restore mix:referenceable check to SessionImpl.getNodeByUUID
Date Fri, 25 Sep 2009 15:29:42 GMT
Restore mix:referenceable check to SessionImpl.getNodeByUUID

                 Key: JCR-2330
                 URL: https://issues.apache.org/jira/browse/JCR-2330
             Project: Jackrabbit Content Repository
          Issue Type: Improvement
          Components: jackrabbit-core
            Reporter: Jukka Zitting
            Priority: Minor

In revision 504623 we commented out the mix:referenceable check in the SessionImpl.getNodeByUUID()

    // since the uuid of a node is only exposed through jcr:uuid declared
    // by mix:referenceable it's rather unlikely that a client can possibly
    // know the internal uuid of a non-referenceable node; omitting the
    // check for mix:referenceable seems therefore to be a reasonable
    // compromise in order to improve performance.
    if (node.isNodeType(Name.MIX_REFERENCEABLE)) {
        return node;
    } else {
        // there is a node with that uuid but the node does not expose it
        throw new ItemNotFoundException(uuid.toString());

This solved a minor performance issue issue with client code that used the node UUID as a
quick way to access a node. The downside was a slight incompatibility with the spec that says
that the getNodeByUUID method is only supposed to work with mix:referenceable nodes.

Now with JCR 2.0 clients can (and should) use the Session.getNodeByIdentifier method that
does not have the mix:referenceable limitation. Thus we can restore the original and correct
functionality of the getNodeByUUID method.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message