On 7/20/07, Alexandru Popescu ☀ <[EMAIL PROTECTED]> wrote:
On 7/20/07, Stefan Guggisberg <[EMAIL PROTECTED]> wrote:
> On 7/20/07, Alexandru Popescu ☀ <[EMAIL PROTECTED]> wrote:
> > On 7/20/07, Jukka Zitting <[EMAIL PROTECTED]> wrote:
> > > Hi,
> > >
> > > On 7/20/07, Stefan Guggisberg <[EMAIL PROTECTED]> 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
> > >
> >
>

Reply via email to