On 2007-09-12 15:49:49 +0200, Julien Anguenot <[EMAIL PROTECTED]> said:

This is an OpenPGP/MIME signed message (RFC 2440 and 3156)

This is an OpenPGP/MIME signed message (RFC 2440 and 3156)

Hi there,

Christian Zagrodnick wrote:
Any opinion about this?

I guess the documentation was a little bit ahead of the implementation
at the time I did this.

Though, I think the after commit hooks  should be called  in the abort()
method as well as it might be interesting, as I mentioned it in the
documentation, and as well to be consistent with the commit() behavior.

Maybe cleaning up the documentation would be simpler if nobody needs
this feature right now.

Well, I'd need it, so I'll implement it, ok?

On 2007-08-30 15:48:53 +0200, Christian Zagrodnick <[EMAIL PROTECTED]> said=

the documentation in the _transaction.py reads:

After-commit hook

Sometimes, applications want to execute code after a transaction is
committed or aborted. [...] The callable will be called with a Boolean=

value representing the status of the commit operation as first
argument (true if successfull or false iff aborted) [...]

And indeed in the commit() method it reads:

self.status =3D Status.COMMITTED
t, v, tb =3D self._saveAndGetCommitishError()
raise t, v, tb
if self._manager:
self._synchronizers.map(lambda s: s.afterCompletion(self))=


But in the abort() method the hooks are not called.

Is this intentional? If yes, the documentation should be adjusted to
reflect that the hooks are *only* called if there *is* a commit and it=

is *failing*.

If not the hooks should be called in abort (my favourite) :)

Christian Zagrodnick

gocept gmbh & co. kg  ·  forsterstrasse 29 · 06112 halle/saale
www.gocept.com · fon. +49 345 12298894 · fax. +49 345 12298891

For more information about ZODB, see the ZODB Wiki:

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

Reply via email to