[Zope-DB] zope2 rdb and reconnect

Dieter Maurer dieter at handshake.de
Mon Dec 10 13:22:50 EST 2007


zope at kevinkal.com wrote at 2007-12-9 13:42 -0500:
>Found the problem.
>I back ported this connector from a zope3 app.  For the retry, being
>raised was rdb.interfaces.Retry, I changed it to raise ZPublisher.Retry,
>which works for zope2.
>
>Maybe there is a better way for zope2, but this works.

A better way would be to raise an exception derived from "ConflictError".

Such an exception would cause ZPublisher to perform the "Retry"
and with a good name for your new exception you would clearly see
what happened in case, the exception were repeated.



-- 
Dieter


More information about the Zope-DB mailing list