On Apr 4, 2005 10:53 AM, Jim Fulton <[EMAIL PROTECTED]> wrote:
>    We would also modify transaction commit methods to call hooks.  Hooks would
>    not be called on sub-transaction commit.  (If necessary, we could add
>    separate sub-transaction hooks, but I don't think we need this.)

The effect here is to register a one-short synchronizer, so all the
code already exists.  Or, add another line just after the
beforeCompletion() call in _transaction.py.  I think the question to
ask is how to make these two closely related APIs understandable to
users.  The synchronizers API is slightly more general, but still
focused clearly on observing transaction boundaries.  Perhaps the new
hook is just a sugar on top of the synchronizer API.

>    This hook is very simple to use an implement and, I think, addresses
>    the requitement much more directly than implementing special data
>    managers.

Perhaps you misunderstand the synchronizer API.  It does not deal with
data managers at all.  The registered objects just implement
beforeCompletion() and afterCompletion().

For more information about ZODB, see the ZODB Wiki:

ZODB-Dev mailing list  -  ZODB-Dev@zope.org

Reply via email to