[Zope-dev] [Bug] Zope's transaction behaviour flawed
Jeremy Hylton
jeremy@zope.com (Jeremy Hylton)
Mon, 3 Feb 2003 10:45:34 -0500
Your basic point makes sense, although I'm not entirely clear on how
transaction management is integrated into the Zope application.
Speaking for ZODB alone, I believe we've recommended that people call
get_transaction().abort() if they catch an exception. I can't recall
getting into any nuances of error handling, but it certainly makes
sense to call abort() after the error handling.
Note that a new transaction is begin implicitly any time a persistence
object is referenced. So the error handling code does execute in the
context of a transaction. It may be that it's just not the
transaction you'd like it to be in. I assume that some work done
during error handling is getting committed with the next successful
request. Yuck.
How does user-level error handling get invoked in Zope?
Jeremy