jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Guggisberg" <stefan.guggisb...@gmail.com>
Subject Re: Isolation level inconsistency.
Date Fri, 20 Jul 2007 10:16:56 GMT
On 7/20/07, Alexandru Popescu ☀ <the.mindstorm.mailinglist@gmail.com> wrote:
> On 7/20/07, Stefan Guggisberg <stefan.guggisberg@gmail.com> wrote:
> > On 7/20/07, Alexandru Popescu ☀ <the.mindstorm.mailinglist@gmail.com> wrote:
> > > On 7/20/07, Jukka Zitting <jukka.zitting@gmail.com> wrote:
> > > > Hi,
> > > >
> > > > On 7/20/07, Stefan Guggisberg <stefan.guggisberg@gmail.com> wrote:
> > > > > AFAIK databases simply don't support the concept of transient changes.
> > > > > please note that the JCR save() is not the equivalent of a db commit().
> > > >
> > > > Well said! A better analogue, as already mentoned, is Statement.execute().
> > > >
> > >
> > > Hope you will not get angry on me :-), but an uncommitted change is a
> > > transient change, so I do think RDBMS are using the transient concept.
> >
> > hehe, i won't ;) but i don't agree.
>
> Great!
>
> > IMO an INSERT, UPDATE or DELETE on
> > database is the equivalent of a saved transient change in JCR.
> >
> > uncommitted (but saved) changes in JCR are the equivalent of uncommitted
> > db changes. at least that's how i view it.
> >
>
> Now, you got me confused :-). What is a saved transient change and
> what is an uncommitted but saved change?

assuming the repository supports transactions, here's an example of a
saved, but uncommitted transient change:

    ...
    node.setProperty("foo", "bar");
    session.save();

and here's an example of a committed saved change
(using a UserTransaction):

    ...
    userTx.begin();
    node.setProperty("foo", "bar");
    session.save();
    userTx.commit();

for more details please see "6.1 Transactions" and specifically
"6.1.3 Save vs. Commit" in the spec.

cheers
stefan

>
> tia,
> ./alex
> --
> .w( the_mindstorm )p.
>
> > cheers
> > stefan
> >
> > >
> > > bests,
> > > ./alex
> > > --
> > > .w( the_mindstorm )p.
> > >
> > > > BR,
> > > >
> > > > Jukka Zitting
> > > >
> > >
> >
>
Mime
View raw message