jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Klimetschek" <aklim...@day.com>
Subject Re: Clarification on Node refresh
Date Tue, 21 Oct 2008 07:51:30 GMT
On Tue, Oct 21, 2008 at 4:54 AM, iapilgrim <iapilgrim@gmail.com> wrote:
> Alexander Klimetschek wrote:
>> (1) copy-on-read, where each read of a node creates a copy of the
>> persisted node in the transient space. This means after you read it
>> once, you would no longer see any changes made to the node by other
>> sessions, until you call refresh().
> Suppose I get a node by
> Node updatedNode = getNode()
> When I call refresh to reflect any state changes, do I need to call
> getNode() again or when I call
> updatedNode.getProperty("xx") that property has reflected the change?

Please note that copy-on-read is purely theoretical, since Jackrabbit
implements copy-on-write and there is no choice between the two

What you are mentioning is an interesting point: this would be a
difficult issue for a copy-on-read implementation to solve, since you
would have to "switch" the content/node state behind the node objects
already passed to the client.

But since Jackrabbit uses copy-on-write, this problem is eliminated.
Node objects are basically based on the persisted state when you read
on them, and as soon as you start to modify a node, it will be
"detached" and put into the transient space.


Alexander Klimetschek

View raw message