--On 4. Mai 2007 22:33:05 +0100 Laurence Rowe <[EMAIL PROTECTED]> wrote:
Following a discussion with several of the sqlalchemy integration authors on #plone today we came up with the following hack to implement this: http://dev.plone.org/collective/browser/collective.lead/trunk/collective/ lead/tx.py
I think z3c.zalchemy is doing it right: """ Changed how the two phase commit works. This is how the two phase commit is used in zope. 1. tpc_begin(txn) 2. commit(txn) 3. tpc_vote(txn) 4. tpc_finish(txn) What zalchemy is doing:- commit does a session.flush() which actually executes all sql statements.
- tpc_finish() does a transaction.commit() in the sqlalchemy transaction - tpc_abort() does a transaction.rollback() in the sqlalchemy transaction If commit fails or another DataManager fails, data is not commited to the database. Thanks to Michael Bayer (the author of sqlalchemy) who gave me the hint to integrate sqlalchemy correctly into the two phase commit. """ Andreas
Description: PGP signature
_______________________________________________ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@zope.org http://mail.zope.org/mailman/listinfo/zodb-dev