Florent Guillaume wrote:
Jim Fulton <[EMAIL PROTECTED]> wrote:
We add a new method to transaction objects:
def beforeCommitHook(hook, *args, **kw):
"""Register a hook to call before the transaction is committed
The provided hook will be called after the transaction's
commit method has been called, but before the commit process
has been started. The hook will be passed the given
positional and keyword arguments.
The hook probably may want to be called with the transaction object
itself as arguments, or is it a YAGNI? I'm saying this because
synchronizers are passed the transaction, OTOH this is at a slightly
higher level and we may not care about the transaction.
If the hook wants the transaction, then the transaction can be passed as
one of the arguments when the hook is registered.
Anyone up for implementing this (with a doctest, of course)?
Yes I'll look at it.
Jim Fulton mailto:[EMAIL PROTECTED] Python Powered!
CTO (540) 361-1714 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org
For more information about ZODB, see the ZODB Wiki:
ZODB-Dev mailing list - ZODB-Dev@zope.org