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

angela commented on JCR-2293:
-----------------------------

summary of a short discussion michael and i had yesterday in the office:

in case of invalidation cache-behavior the client (jcr2spi) is aware of changes 
only if the client is explicitely refreshed or (as a side effect) if the 
hierarchy at a given level isn't complete. this leaves to the inconsistencies 
mentioned above if the API consumer registered event-listeners as the hierarchy 
information isn't adjusted upon event delivery.

suggested fix: if event listeners are registered the hierarchy must be adjusted 
similar to observation cache-behavior. in contrast to the latter the update 
information isn't complete but only affects those items that fall within the 
responsibility of a registered event listener... all the rest (and after 
releasing the event listener again) is still governed by the normal 
invalidation behavior.

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

Reply via email to