[ZODB-Dev] Re: afterCommitHook

Julien Anguenot ja at nuxeo.com
Mon Sep 26 18:33:25 EDT 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Sorry, I've been busy with other stuffs in between...

Dieter Maurer wrote:
> Florent Guillaume wrote at 2005-9-24 10:10 +0200:
> 
>>Dieter Maurer  <dieter at handshake.de> wrote:
>>....
>>
>>>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.
> 
> 	
> I should have added "will be lost, unless he itself commits the transaction".

And in this case aborting the transaction at the end of the
afterCommitHook() won't affect what the use did since it would have done
the commit himself beforehand. cool ! :)

> 
> 
>>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?
> 
> 
> Unless we do very special things, this ("committing" explicitly in
> the "postCommitHook") will be possible.
> 

You mean "afterCommitHook()" here right ?

If so, yes. If the user wants to deal with the commit we should let him
the ability to do so since we can deal with it following your proposal.

So +1 with Dieter proposal. Sounds good.

	J.

- --
Julien Anguenot | Nuxeo R&D (Paris, France)
CPS Platform : http://www.cps-project.org
Zope3 / ECM   : http://www.z3lab.org
mail: anguenot at nuxeo.com; tel: +33 (0) 6 72 57 57 66
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFDOHc1GhoG8MxZ/pIRAjX2AJ4kyonBSl/pUs9/c6u5SNGSO3TtQgCfZl62
jYpEqr2w+NWSRqERvjaagqE=
=PZzL
-----END PGP SIGNATURE-----


More information about the ZODB-Dev mailing list