Re: query about after commit hook

Jim Fulton <[email protected]>
Newsgroups gmane.comp.web.zope.zodb
Message-ID <CAPDm-Fi7SuHrNEBi97cQwj6MteY6ppc+3SDQu+tNtVkfgFFNLA@mail.gmail.com>
On Thu, May 19, 2016 at 8:33 AM, Sanjay Rao <[email protected]> wrote:
> Hi,
>
> Is this flow correct ?
>
> - Begin a new transaction
> - Run a method (method1). method1 registers method2 as after-commit-hook

Nothing requires methods...but that's probably beside the point.

> - Commit transaction
> - method2 is called
> - method2 raises exception

This exception is caught and largely ignored.

> - begin a new transaction
> - Call method3 and commit transaction

These 2 bullets are not a consequence of the others.

IMO, after commit hooks are largely bug magnets that should be ignored
by almost all users.  (I've found a valid use for them, but it's very
subtle.)

Jim

-- 
Jim Fulton
http://jimfulton.info

-- 
You received this message because you are subscribed to the Google Groups "zodb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.