[ZODB-Dev] Re: afterCommitHook

Florent Guillaume fg at nuxeo.com
Sat Sep 24 04:10:13 EDT 2005


Dieter Maurer  <dieter at handshake.de> wrote:
> >There's no problem either way if users swear not to do "anything
> >transactional" in after-commit hooks.  It's unattractive to leave that to
> >good intentions and/or luck, and I don't see an easy way for either approach
> >to _prevent_ "something transactional" from happening while an after-commit
> >hook is running.
> 
> Thus, promiss the user that any persistent changes he may try
> will be lost: Put the "afterCommit" in its own transaction and abort
> it afterwards.

That would be a nice solution I think.

What would happen though if the post-transaction user code decided to
commit the transaction? Could that be made to work, for code that would
like to change persistent objects?

Florent

-- 
Florent Guillaume, Nuxeo (Paris, France)   CTO, Director of R&D
+33 1 40 33 71 59   http://nuxeo.com   fg at nuxeo.com


More information about the ZODB-Dev mailing list