jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Klimetschek <aklim...@adobe.com>
Subject Re: software engineering question
Date Sat, 20 Nov 2010 15:30:00 GMT
On 16.11.10 19:11, "ChadDavis" <chadmichaeldavis@gmail.com> wrote:

>I'm curious as to the design motivations behind some of the Jackrabbit
>code.  I'm not questioning these choices.  I'm actually trying to
>learn from them.  In particular, I'm interested in the motivations
>that lead to the deprecation of node.save() in favor of
>session.save().  Any insight would be appreciated.  Thanks!
>

This was changed in the spec for the benefit of implementors. Supporting
node.save() is/can be much more difficult (especially when writing a JCR
connector to an existing repository system). Having a single session
save() is what all databases do, because it can be implemented simpler,
more scalable, etc.

For applications node.save() often seems much more convenient, but if you
think through it, it often is better to resort to a session.save() that
includes the entire transaction. If only storing a subtree before other
things that have already been changed is really needed, one can have a
second session for that part.

Regards,
Alex

-- 
Alexander Klimetschek
Developer // Adobe (Day) // Berlin - Basel





Mime
View raw message