[Zope] Session and objects
Bo M. Maryniuck
b.maryniuk@forbis.lt
Tue, 1 Oct 2002 14:59:19 +0200
On Tuesday 01 October 2002 14:40, Oliver Bleutgen wrote:
> Hmm, I agree it may be nice to store the an instance of the Database
> Connection in a session.=20
But there is *no way*. Yes, you can pickle it as text and store it there,=
then=20
load back again (maybe), but then you could have lots of issues with the=20
current transaction. And it is that slow.
> Maybe, if you can afford it storage-wise, create normal db connections
> for every user and open/close them on demand. This (esp. the closing
> part) should be doable with what Jens said:
Yes, that's what I did and this works fine without the problem.
> So store the (relative) path to your db-connection objects in the
> session and close them if the session expires.
Well. Seems that there is thr only one good solution via remote scripting=
by=20
the same model as Oracle drops timedout connections...
O.K., thank you.
P.S. The best idea has Matt Kromer, but no time to develope his nice DA. =
;-)
--=20
Regards, Bogdan
The day after tomorrow is the third day of the rest of your life.