Bug 780105 (SOA-2476) - JCR session does not serve updated data in second and additional reads
Summary: JCR session does not serve updated data in second and additional reads
Keywords:
Status: CLOSED NOTABUG
Alias: SOA-2476
Product: JBoss Enterprise SOA Platform 5
Classification: JBoss
Component: EDS
Version: 5.1.0.ER3
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
: ---
Assignee: Van Halbert
QA Contact:
URL: http://jira.jboss.org/jira/browse/SOA...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-10-26 05:43 UTC by Jiri Pechanec
Modified: 2010-10-26 13:35 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-10-26 13:35:08 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SOA-2476 0 None None None Never

Description Jiri Pechanec 2010-10-26 05:43:42 UTC
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.

Comment 1 Van Halbert 2010-10-26 12:58:26 UTC
Link: Added: This issue depends MODE-981


Comment 2 Van Halbert 2010-10-26 13:26:31 UTC
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.   

Comment 3 Van Halbert 2010-10-26 13:27:35 UTC
Link: Removed: This issue depends MODE-981 


Comment 4 Van Halbert 2010-10-26 13:35:08 UTC
If this is a major issue,  then this needs to be escalated to get an enhancement in ModeShape.


Note You need to log in before you can comment on or make changes to this bug.