Jim Washington wrote at 2005-12-13 21:40 -0500:
> ...
>Now, looking closer at the code, a ping like this might be not too bad, 
>because isConnected() is only called when a connection is requested, not 
>for every SQL statement executed.  So, it might not be so onerous as 
>originally thought. Still not ideal, though.

Be careful what you do when you find that "isConnected()" returns false.
Note, that, in general, it would be a bug to just reopen a new connection
in this case: previous operations against the connection might have
been lost without notice when you simply reopen a new connection
and do as if nothing bad had happened.
Instead, you should reopen the connection and then raise an exception
similar to "ZODB.POSException.ConflictError". Hopefully, the publisher
will handle this kind of exception correctly (by retrying the complete

Zope3-dev mailing list
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to