On 2008-01-18 14:20, Stuart Bishop wrote:
> M.-A. Lemburg wrote:
> 
>> Now, if a database provides such an XA interface, this could
>> also be made available to a Python TM. You'd then have to
>> open the connection via this XA interface rather than the
>> standard connection constructor (or pass in a parameter
>> to this constructor to make it use the XA open instead of
>> the RM open).
>>
>> Perhaps we could piggy-back the XA-style interface onto
>> the connection interface and its constructor and turn it
>> into an XA DB-API extension ?!
> 
> If that has more than just 'prepare_transaction', 'commit_transaction' and
> 'rollback_transaction' it has no place in the DB-API IMO. These three
> actions are the entirety of what PostgreSQL provides and are the building
> blocks you need to build anything more complex (including XA). We don't need
> driver authors  to build a transaction manager. We just need driver authors
> to provide the building blocks for DB-API connections to be integrated with
> transaction managers.

The XA API is a bit more complex than just the three APIs you
mention (with "prepare_transaction" meaning "prepare to commit
a transaction"):

http://www.opengroup.org/onlinepubs/009680699/toc.pdf

I'm not suggesting that we need to have all those APIs, but the
essential APIs need to be present, ie. you need to be able to:

 * put a connection under TM control or associate with a TM
   transaction (xa_open/xa_start/ax_reg)
 * prepare to commit a TM transaction (xa_prepare)
 * finally commit a TM transaction (xa_commit)
 * finally rollback a TM transaction (xa_rollback)
 * release the connection from TM control (xa_close/xa_end/ax_unreg)

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Jan 18 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
_______________________________________________
DB-SIG maillist  -  DB-SIG@python.org
http://mail.python.org/mailman/listinfo/db-sig

Reply via email to