Hide Forgot
project_key: SOA When this code is executed Session writeSession = RepositoryReferenceFactory.getRepository("repository").login(); Session readSession = RepositoryReferenceFactory.getRepository("repository").login(); Node root = writeSession.getRootNode(); Node n = root; for (int j = 0; j < 2; j++) { for (int i = 0; i < 10; i++) { n = n.addNode("newNode", "nt:unstructured"); } writeSession.save(); System.out.println(j + "." + readSession.getNode(n.getPath())); } readSession.logout(); writeSession.logout(); It prints 0./newNode/newNode/newNode/newNode/newNode/newNode/newNode/newNode/newNode/newNode {jcr:primaryType=nt:unstructured, } and then throws an exception javax.jcr.PathNotFoundException: Unable to find "{}newNode/{}newNode/{}newNode/{}newNode/{}newNode/{}newNode/{}newNode/{}newNode/{}newNode/{}newNode/{}newNode/{}newNode/{}newNode/{}newNode/{}newNode/{}newNode/{}newNode/{}newNode/{}newNode/{}newNode"; lowest existing path is "/{}newNode/{}newNode/{}newNode/{}newNode/{}newNode/{}newNode/{}newNode/{}newNode/{}newNode/{}newNode If the read session is closed and opened between the reads then the data are served correctly. In my opinion if the data are updated in the repository then the session should see the new data. The issue was verified with in-memory and JPA connectors.
Link: Added: This issue depends MODE-981
In regards to sharing data across sessions, Randall has explained that this is not done automatically, unless you call session.refresh(). This is not the current design based on the engineers understanding of the spec.
Link: Removed: This issue depends MODE-981
If this is a major issue, then this needs to be escalated to get an enhancement in ModeShape.