Re: non-persistant objects vs transaction
- From: Alexander Larsson <alexl redhat com>
- To: Colin Walters <walters redhat com>
- Cc: yarrr-list gnome org
- Subject: Re: non-persistant objects vs transaction
- Date: Mon, 02 May 2005 11:54:00 +0200
On Fri, 2005-04-29 at 16:54 -0400, Colin Walters wrote:
> On Fri, 2005-04-29 at 11:14 +0200, Alexander Larsson wrote:
>
> > However, the ClosedComment changes are not commited until the
> > transaction is commited, which is normally at the end of the xmlrpc
> > call. If the transaction fails (for instance due to the oportunistc
> > locking with versioning that walters just added) we'll loose the
> > LiveComment, but not get a ClosedComment.
>
> Right. I added the optimistic locking because I thought there would be
> a conflict where two people simultaneously proponent a ClosedComment. I
> started refactoring the code so we could have an XML-RPC method note
> that it wanted to control the transaction itself.
What were you planning to do with such a note? And who would use it?
> The reason is due to the way we're Hibernate maps the Set of proponents
> to SQL. Adding to it doesn't actually dirty the ClosedComment object,
> since it's mapped as a separate database table. Thus, you can't get
> conflicts with two people adding to it.
>
> Since in fact "proponenting" is the only way of modifying a closed
> comment, AFAICS we simply cannot get StateObjectStateExceptions (i.e.
> conflicts) here. We could get database failures of course though, but
> recovery in that situation is problematic. I guess it'd be nice though
> not to have the live comment disappear so people can at least copy and
> paste it.
So, we're sort of safe now then. At least in this case, and I think that
is the only interface between persistant and non-persistant object right
now. We could just ignore it for now.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Alexander Larsson Red Hat, Inc
alexl redhat com alla lysator liu se
He's a gun-slinging umbrella-wielding vagrant haunted by memories of 'Nam.
She's a wealthy mutant lawyer looking for love in all the wrong places. They
fight crime!
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]