[Zope-DB] Per-user connections

M.-A. Lemburg mal@lemburg.com
Mon, 09 Dec 2002 11:21:00 +0100

Bo M. Maryniuck wrote:
> On Monday 09 December 2002 12:07, M.-A. Lemburg wrote:
>> From a technical point of view, it should be possible to
>>place a Zope connection object into a user or even session
>>object, since they are pickleable. 
> They don't. Try it and see.

They are. Try it and see :-)

Seriously, the Zope Connection objects are moved in and out of
the ZODB all the time, so they must be pickleable. Indeed, when
you load them, they check whether to reestablish the connection
or not (most of them always, reconnect, the mxODBC Zope DA one
tries to restore the previously stored connect setting).

I think you are talking about the underlying physical connections.
These cannot be pickled, of course.

Marc-Andre Lemburg
CEO eGenix.com Software GmbH
eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,...
Python Consulting:                               http://www.egenix.com/
Python Software:                    http://www.egenix.com/files/python/