[ZODB-Dev] Re: [Zope-dev] Re: post publishing hook
Tim Peters
tim at zope.com
Mon Apr 4 11:54:12 EDT 2005
[Jeremy Hylton]
> I don't have anything invested in the decision, but synchronizers were
> intended to support this use case. They provide a way for arbitrary
> application code to observe the transaction boundaries without pretending
> to be a data manager.
There are two big differences here I know about:
1. Synchronizers are registered with transaction managers rather than
with transactions. So once you register a synchronizer, new
transactions continue to invoke it. The proposed gimmick only
applies to a single transaction.
2. The synchronizer beforeCompletion() method is invoked on transaction
abort as well as transaction commit. The proposed gimmick is invoked
only on transaction commit.
There's one seeming difference that isn't much of a difference:
{before,after}Completion() are called with a single argument, the
transaction object. The proposal passes an arbitrary collection of
arguments to the hook function.
More information about the ZODB-Dev
mailing list