Save vs. Commit

Chris Muller chris at funkyobjects.org
Thu Mar 23 02:21:40 UTC 2006



----- Forwarded Message ----
From: Chris Muller <afunkyobject at yahoo.com>
To: magma at discuss.squeakfoundation.org
Sent: Wednesday, March 22, 2006 3:01:03 PM
Subject: Re: Save vs. Commit

Hi again,
 
> there is a fitting commit strategy dubbed "2) User-controlled
> transactions, with auto-begin". So if I understand correctly, I would
> open a session on startup, get the root to load my model, do a
> #begin, and in the "save" method I just do a #commitAndBegin. Right?
 
 Yep, this should work.
 
> I intend to do all of this as single user using a local session in a
> single server image - is there anything I'd need to watch out for?
> Like, is there a time-out on the session?

There is no time-out based on time. There is a way a session can be "kicked off" in a multi-user setting.  It's when other users are very active with commits and you are not at least refreshing (begin, commit or abort) for a long time.  Their object changes get piled on to your session (in the server), growing the servers memory consumption.  If you wait too long, your session will get too many pending updates and the server will be forced to disconnect your session.
 
 GemStone does the same thing, but I hope to find a way around this some day..
 
 But this can never happen in a single-user setting.
 
 Cheers,
   Chris








More information about the Magma mailing list