jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From iapilgrim <iapilg...@gmail.com>
Subject Re: Clarification on Node refresh
Date Wed, 22 Oct 2008 03:32:19 GMT

Hi Alex,
With copy-on-write strategy, two subsequents read can give different
results. But when I read in JCR spec (6.2.3 Node Read Methods).
getNode(String relPath):  Returns the node at relPath  relative to this

 Within the scope of a single Session  object, if a node has been acquired
with getNode , any subsequent call of getNode  reacquiring the same node
must return a Node  object reflecting the same state as the earlier Node 
Whether this object is actually the same Node  instance, or simply one
wrapping the same state, is up to the implementation. See Re-using
Item Objects .
--> Does it mean we always get the same state of a Node ( in a Session) no
matter what which strategy is ( copy-on-write or copy-on-read).
I'm really confused. Could you explain it to me?

Alexander Klimetschek wrote:
> (2) copy-on-write (Jackrabbit), where a node is copied into the
> transient space only when you modify it. This means all reads to
> non-modified nodes will always give the most up-to-date veersion of
> that node. That also implies two subsequents read can give different
> results (which would not be the case for the copy-on-read variant). In
> this case refresh() has no effect on non-modifed nodes. Jackrabbit
> uses this variant since it is much more useful for most applications
> (ie. you would permanently re-login to get a new session or call
> refresh for all read operations).
> Alexander Klimetschek
> alexander.klimetschek@day.com

View this message in context: http://www.nabble.com/Clarification-on-Node-refresh-tp20019799p20103437.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

View raw message