--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:

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

Thanks to Michael Bayer (the author of sqlalchemy) who gave me the hint to
integrate sqlalchemy correctly into the two phase commit.



Attachment: pgpTh1fCqZm2X.pgp
Description: PGP signature

For more information about ZODB, see the ZODB Wiki:

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

Reply via email to