[DB-SIG] Two-phase commit API proposal (was Re: Any standard for two phase commit APIs?)
M.-A. Lemburg
mal at egenix.com
Tue Jan 22 20:31:14 CET 2008
On 2008-01-22 19:48, Dieter Maurer wrote:
> James Henstridge wrote at 2008-1-22 20:33 +0900:
>> ...
>> I do see a use for the branch qualifier though. In a distributed
>> transaction, each resource should have a different transaction ID
>
> Why?
> Why is it not equally good to use a common transaction id for
> all resource managers?
>
>> that
>> share a common global transaction ID but separate branch qualifiers.
>>
>> As transaction IDs are global within database clusters for some
>> backends (PostgreSQL, MySQL and probably others), the branch qualifier
>> is necessary if two databases from the cluster are used in the global
>> transaction.
>
> They refer to the same transaction -- even when several databases
> in a cluster are affected.
>
> The transaction as a whole will want to get prepared, committed, rolledback...
Sections 2.2.5 and 2.2.6 explain why you need a global transaction
id and a branch id as well:
http://www.opengroup.org/onlinepubs/009680699/toc.pdf
Branch ids are used for e.g. multiple connections of the same RM
engaging in a global transaction. Each of those connections gets
its own branch id.
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Jan 22 2008)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
:::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! ::::
eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
Registered at Amtsgericht Duesseldorf: HRB 46611
More information about the DB-SIG
mailing list