You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Marcel Reutegger (JIRA)" <ji...@apache.org> on 2005/07/18 10:42:17 UTC

[jira] Reopened: (JCR-170) VirtualItemStates of node types definitions not accessible with uuid

     [ http://issues.apache.org/jira/browse/JCR-170?page=all ]
     
Marcel Reutegger reopened JCR-170:
----------------------------------


I see. However the nodes are not cached on startup, but only when the root node of the virtual node type hierarchy is accessed for the first time.

A quick dirty fix that worked for me was:

Index: VirtualNodeTypeStateProvider.java
===================================================================
--- VirtualNodeTypeStateProvider.java	(revision 219171)
+++ VirtualNodeTypeStateProvider.java	(working copy)
@@ -58,6 +58,11 @@
     public VirtualNodeTypeStateProvider(NodeTypeRegistry ntReg, String rootNodeId, String parentId) {
         super(ntReg, new NodeId(rootNodeId));
         this.parentId = parentId;
+        try {
+            getRootState();
+        } catch (ItemStateException e) {
+            // ignore
+        }
     }
 
     /**


But there is certainly a more elegant solution to this.

> VirtualItemStates of node types definitions not accessible with uuid
> --------------------------------------------------------------------
>
>          Key: JCR-170
>          URL: http://issues.apache.org/jira/browse/JCR-170
>      Project: Jackrabbit
>         Type: Bug
>   Components: nodetype
>  Environment: svn revision: 219171
>     Reporter: Marcel Reutegger
>     Assignee: Tobias Strasser
>     Priority: Minor
>      Fix For: 1.0

>
> The VirtualNodeTypeStateProvider that maps node type definitions into the workspace under /jcr:system/jcr:nodeTypes does not implement the methods:
> - internalGetNodeState(NodeId id)
> - internalHasNodeState(NodeId id)
> This has the effect that ItemStates that reflect node type definitions are not accessible directly with their uuid.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira