Laurence Rowe wrote:
> On 8 June 2010 09:51, Chris Withers <ch...@simplistix.co.uk> wrote:
>> Hi All,
>> I need to write a data manger that interacts with a transactional system
>> that doesn't support two phase commit.
>> Looking for inspiration, I went to look at zope.sqlalchemy and
>> In the non-tpc situation, the former does the "commit" in tpc_vote while
>> the latter does it in tpc_finish.
>> Which is "right"? What are the tradeoffs involved?
> Committing in tpc_vote is right so long as you ensure your data
> manager sorts last, and that there are no other data managers in the
> transaction which are using the same trick. See:
> For zope.sendmail, committing in tpc_finish makes sense, especially
> when using QueuedMailDelivery because enqueuing the message in the
> maildir is guaranteed to succeed (the file is just renamed on commit).
> Any failure here would lead to a critical error and inconsistent state
> between the transactional resources.
Okay, I see the two different cases. What's the recommended course of
action when you end up with two data managers where tpc_vote is the
"right" place to implement?
Zope-Dev maillist - Zope-Dev@zope.org
** No cross posts or HTML encoding! **
(Related lists -