>I am currently going over the XA implementation in Jaybird, and this 
> prompted some questions regarding transactions, connections and 
> two-phase commit in Firebird.
> 
> First of all: are transactions associated with the connection that 
> created it, or is it possible to 'share' the same transaction handle 
> with different connections? In other words: Can I use a single 
> transaction handle for multiple connections that are enlisted in the 
> same distributed transaction?

    When you start distributed transaction, you pass handles of all
participated attachments and got single common handle of distributed 
transaction. This handle is valid within every attachments above.

    In FB3 we are going to implement additional API call to join two or 
more pre-existing transactions. It will return new handle of new distributed
transaction, iirc.

> Second: if I read the IB6 ApiGuide.pdf correctly, then a single 
> connection can have multiple transactions open in parallel, is that a 
> correct interpretation?

    Yes. And this is unique feature of IB\FB.
 
> Third: Can Firebird handle enlistment of multiple transaction handles in 
> a single two-phase commit, or would this require using a single 
> transaction handle for a single transaction branch?

    Not sure i understand you correctly... Attachment could participate in 
few separate distributed transactions at the same time (if this was your 
question).

Hope this helps,
Vlad


------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to