jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dürig (JIRA) <j...@apache.org>
Subject [jira] Commented: (JCR-2293) PathNotFoundException but item exists
Date Fri, 02 Oct 2009 12:47:23 GMT

    [ https://issues.apache.org/jira/browse/JCR-2293?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12761565#action_12761565
] 

Michael Dürig commented on JCR-2293:
------------------------------------

The problem with the suggested fix is that event listeners are registered on a per session
(i.e. WorkSpaceManager) basis. So when a event fires it would have to be delivered to all
HierarchyEventListener of all WorkSpaceManagers such that all hierarchies are correctly updated.


> PathNotFoundException but item exists
> -------------------------------------
>
>                 Key: JCR-2293
>                 URL: https://issues.apache.org/jira/browse/JCR-2293
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-jcr2spi
>    Affects Versions: 1.5.7, 2.0.0
>            Reporter: Michael Dürig
>
> The following test case (for jcr2spi) throws a PathNotFoundException for an item which
exists. It does not throw if the marked line below is commented out. 
> public void testBug24687() throws RepositoryException {
>     String parentPath = testNode.getPath();
>     String folderName = "folder_" + System.currentTimeMillis();
>     Session session = getHelper().getReadWriteSession();
>     Session session2 = getHelper().getReadOnlySession();
>     session2.getItem(parentPath);  // removing this line makes the failure go away
>     Node parent = (Node) session.getItem(parentPath);
>     Node toDelete = parent.addNode(folderName, "nt:folder");
>     parent.save();
>     try {
>         Item item2 = session2.getItem(parentPath + "/" + folderName);  // wrongly throws
PathNotFoundException
>         assertEquals(parentPath + "/" + folderName, item2.getPath());
>     }
>     finally {
>         toDelete.remove();
>         parent.save();
>         assertFalse(parent.hasNode(folderName));
>     }
> }

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


Mime
View raw message