[ZODB-Dev] preventing a transaction from committing within app
code
Jeremy Hylton
jhylton at gmail.com
Wed Sep 8 13:30:19 EDT 2004
On Wed, 08 Sep 2004 12:35:19 -0400, Chris McDonough <chrism at plope.com> wrote:
> > The problem, then, is in the
> > policy of starting a new top-level transaction implicitly. If Zope
> > could arrange so that new transactions were begun explicitly, then
> > some actions would fail with the error "no transaction active."
>
> That's a great idea. That would be a lot better. I don't know that
> it's possible to change the behavior of ZODB to do this now, though.
> Zope itself would likely be fine with it (only a couple places would
> need to change), but other apps would likely croak. Would a config
> option be reasonable?
The ZODB 3.3 transaction API should allow you to plugin a transaction
manager that implements this policy. (At least I hope it does.) I'm
not sure how to plumb that through Zope, but a configuration option
sounds plausible. You would probably need to revise products and
internal code that intended to create new transactions to explicitly
call transaction.begin().
Jeremy
More information about the ZODB-Dev
mailing list