You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Oliver Zeigermann <ol...@gmail.com> on 2004/11/05 23:30:43 UTC

Why is there something a save method

Why is there something like Ticket.save (resp. Session.save) or
Node.save? Is it because of the two compliance levels? Will calls to
save be needed when transactions are available as well?

Does Jackrabbit support transactions, yet?

Oliver

Re: Why is there something a save method

Posted by Tobias Strasser <to...@gmail.com>.
> Why is there something like Ticket.save (resp. Session.save) or
> Node.save? Is it because of the two compliance levels? Will calls to
> save be needed when transactions are available as well?

the spec says (section 4.1.3.2):

4.1.3.2 Transient Storage in the Session
Changes made through most methods of Session, Node  or Property are
not immediately reflected in the persistent workspace. The changes are
held in transient storage associated with the Session object until
they are either persisted (using save) or discarded (using refresh).
Changes not yet saved or discarded are called pending changes. Pending
changes are immediately visible through the Session that made them but
are not visible through other Sessions accessing the same workspace.
Session.save validates and (if validation succeeds) persists all
pending changes currently stored in the Session object, making them
visible to other sessions. Conversely, Session.refresh discards all
pending changes currently stored in the Session. For more fine-grained
control over which changes are persisted or discarded, the methods
Item.save and Item.refresh are also provided. Item.save saves all
pending changes in the Session that apply to that particular item or
its subtree. Analogously, Item.refresh discards all pending changes
that apply to that item or its subtree. See 6.3 Writing to the
Repository.

> Does Jackrabbit support transactions, yet?

read post from stefan:

Message-ID: <90...@mail.gmail.com>
Date: Thu, 21 Oct 2004 19:49:00 +0200
From: Stefan Guggisberg <st...@gmail.com>
Reply-To: Stefan Guggisberg <st...@gmail.com>
To: jackrabbit-dev@incubator.apache.org
Subject: JTA support

[...]
folks,
as you might have noticed i have just committed a large chunk
of code. this is the first implementation of transaction support (JTA)
in jackrabbit!

the code has been contributed by dominique pfister and i think
he has done a great job :)

dominique is lurking in the jackrabbit-dev list and i'm sure that
he'll be happy to answer all tx related questions that might come up.

jta support is exposed via the XASession, i.e. Repository.login()
returns a XASession instance instead of the regular Session.
[...]

-- 
------------------------------------------< tobias.strasser@day.com >---
Tobias Strasser, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel
T +41 61 226 98 98, F +41 61 226 98 97 
-----------------------------------------------< http://www.day.com >---