geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <david_jen...@yahoo.com>
Subject Re: what is the relation between global transaction and transaction branch in XA?
Date Wed, 17 Oct 2007 15:59:15 GMT

On Oct 17, 2007, at 12:32 AM, Guo-ping.Zhang@sybase.com wrote:

> Hi,
>
> Can someone tell me what is the relation between global transaction  
> and transaction branch in XA?

The global id is created when the xa transaction is first started.  A  
branch id is created for each resource manager enlisted in the  
transaction.

Note that for distributed transactions (which geronimo currently does  
not support) a remote server B will get a branch id on the server A  
that is calling it, and then B will generate further branches for the  
resource managers it uses.  If A and B use the "same" resource  
manager (such as a database) this can result in the database getting  
requests in the same global transaction with different branch ids.
>
> Does transaction branch refer to one RM in global transaction or  
> does it relates with threads?

Branches are associated with RMs.  Its possible to imagine treating  
additional threads as resource managers but I don't know of anyone  
having a working implementation of this: its certainly not encouraged  
by javaee.

>
> In Xid structure, there is transaction branch id and global  
> transaction id, normally how are they related?

There's no required relationship between them

thanks
david jencks

>
> Thanks & Best Regards
>


Mime
View raw message