On 18/01/2008, M.-A. Lemburg <[EMAIL PROTECTED]> wrote: > > Looking at the IDataManager API, it looks like it looks like the > > correct way to implement two phase commit would be: > > > > 1. if tpc_begin() is called, note that two-phase commit is being used. > > 2. in commit(), simply prepare the transaction if the two-phase commit > > flag is set, rather than actually committing. If this fails, the > > transaction obviously fails. > > 3. make tpc_vote() a no-op. > > 4. tpc_finish() commits the prepared transaction > > 5. abort() and tpc_abort() roll back the prepared transaction (if one > > was prepared). > > Agreed, but at least for Zope database adapters, that's not what's > implemented (have a look at ZRDB/TM.py).
This looks pretty much the same as the Zope 3 zope.app.rdb case: the default DataManager implementation provided by Zope doesn't support two-phase commit, but it is possible for an adapter to provide its own DataManager implementation. This isn't too surprising when you consider that there is no standard two-phase commit API for database adapters. James. _______________________________________________ DB-SIG maillist - DB-SIG@python.org http://mail.python.org/mailman/listinfo/db-sig