[Zope3-dev] Re: rdb: Disappearing Connection

Florent Guillaume fg at nuxeo.com
Tue Dec 13 20:03:43 EST 2005


Jim Washington wrote:
> Spelunking a bit in the code, 
> zope.app.rdb.ZopeDatabaseAdapter.isConnected() looks at whether 
> _v_connection is present, not whether the connection is actually alive.  
> If we fix this here, isConnected() perhaps should handle the case where 
> the connection might be reaped by the back end db.

Frankly anything that uses _v_ attributes is asking for trouble because 
it relies on low level behaviour of the ZODB and persistence mechanisms. 
They can disappear at unpredictable times. Avoid them.

Florent

-- 
Florent Guillaume, Nuxeo (Paris, France)   Director of R&D
+33 1 40 33 71 59   http://nuxeo.com   fg at nuxeo.com


More information about the Zope3-dev mailing list