rieh25 wrote at 2006-11-16 12:12 -0800:
>I wanted to do it because for some reason, my oracle connector (DCOracle)
>keeps disconnecting, and so I thought maybe it would be possible to define a
>python method to periodically check on it and reconnect it if necessary.

Many DA catch the exceptions that result from a lost connection
and then reconnect automatically.

I have seen such code in the "DCOracle2" DA as well.

Note, that simply reconnecting and redoing the query is
conceptionally wrong. It may lead to only half committed transactions.
After the reconnect, an exception derived from
"ZODB.POSException.ConflictError" should be raised which causes
the ZPublisher to redo the complete transaction.

Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to