From: Kevin Dahlhausen <kdahlhaus@ya...> - 2004-06-28 14:28:25
I'm running into trouble when developing - as webware restarts when
seeing a changed class it writes the session data out to disk. Since I
have my SQLObject 'User' in session an exception is thrown about not
being able to write out 'thread lock'. Actually, I assume it's the
It sounds like some kind of proxy is needed when putting these objects
into session when saving and restoring the session data from disk.
I seem to recall an article about doing something like this with
Middlekit a few years ago. Haven't been able to locate it though.
Does anyone have pointers to information on this, or even better a
patch for SQLObjects in session to be 'written' to disk? I'm not
worried about this happening in a production environment, just to make
develpment more efficient.
Kevin Dahlhausen 'Do' or 'do not.' There is no 'Try.'
From: Frank Barknecht <fbar@fo...> - 2004-06-28 16:42:36
Kevin Dahlhausen hat gesagt: // Kevin Dahlhausen wrote:
> I'm running into trouble when developing - as webware restarts when
> seeing a changed class it writes the session data out to disk. Since I
> have my SQLObject 'User' in session an exception is thrown about not
> being able to write out 'thread lock'. Actually, I assume it's the
Are you sure it is necessary to put SQLObjects into the session? Every
SQLObject could be recreated from the "id" (or whatever primary key
you use) with something like
userid = self.session().value("UserID", None)
u = User(userid)
# or for newer SQLObjects:
# u = User.get(userid)
As SQLObjects contain a database connection, I'd guess it's never
possible to make them pickleable, which would is required for session
storage. The "UserID" however is a simple int value normally, so can
get pickled without problems.
Frank Barknecht _ ______footils.org__
Get latest updates about Open Source Projects, Conferences and News.