Re: non-persistant objects vs transaction
- From: Alexander Larsson <alexl redhat com>
- To: "yarrr-list gnome org" <yarrr-list gnome org>
- Subject: Re: non-persistant objects vs transaction
- Date: Tue, 03 May 2005 14:23:42 +0200
On Fri, 2005-04-29 at 11:14 +0200, Alexander Larsson wrote:
> There is a pretty easy fix for this issue:
>
> diff -u -p -r1.46 ActiveTopic.java
> --- src/org/gnome/yarrr/ActiveTopic.java 28 Apr 2005 12:23:11 -0000 1.46
> +++ src/org/gnome/yarrr/ActiveTopic.java 29 Apr 2005 09:10:40 -0000
> @@ -50,6 +50,7 @@ public class ActiveTopic extends Topleve
> ClosedComment comment = new ClosedComment(this.getTopic(), closer, livecomment.getText(), allAuthors, msgs);
> addMonitor(comment);
> this.getTopic().addClosedComment(comment);
> + HibernateUtil.commitTransaction();
> discussion.removeComment(livecomment, closer);
> this.signalChanged();
> return comment;
>
Looking at the current code it seems this will not work at all anymore,
since HibernateTransactionInvoker isn't using
HibernateUtil.beginTransaction() and the related calls. This means we
can't do anything fancy with the transaction in an xmlrpc call. Was
there some specific reason for this?
I guess enforcing a simpler model makes it easier to follow the code,
although in some cases (like above) its nice to be able e.g. commit the
transaction earlier.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Alexander Larsson Red Hat, Inc
alexl redhat com alla lysator liu se
He's a bookish umbrella-wielding cowboy on a mission from God. She's a
vivacious psychic mercenary who inherited a spooky stately manor from her late
maiden aunt. They fight crime!
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]