Subject | Re: [Firebird-Architect] Re: [Firebird-devel] external data sources |
---|---|
Author | David Jencks |
Post date | 2004-04-29T23:08:49Z |
Umm, jaybird has supported XAResource interface through the jca classes
for several years now. Firebird remains the only open source database
with actual 2pc and xa/jta support.
If I recall correctly comments from Jim and Ann in pre-borland days
the firebird tm would run more-or-less xa protocol with other
dbs(oracle?).
The major problem in using the firebird tm with an external XAResource
is getting it to generate branch xids that are consistent with the
incoming branch xid from the external controlling tm. If it is
coordinating several firebird-only database txs it can just use the
internal firebird transaction id, but for an external xaresource it
needs to generate xids.
david jencks
for several years now. Firebird remains the only open source database
with actual 2pc and xa/jta support.
If I recall correctly comments from Jim and Ann in pre-borland days
the firebird tm would run more-or-less xa protocol with other
dbs(oracle?).
The major problem in using the firebird tm with an external XAResource
is getting it to generate branch xids that are consistent with the
incoming branch xid from the external controlling tm. If it is
coordinating several firebird-only database txs it can just use the
internal firebird transaction id, but for an external xaresource it
needs to generate xids.
david jencks
On Thursday, April 29, 2004, at 11:14 AM, Roman Rokytskyy wrote:
>> Any proposal? Currently I have two options in my mind:
>
> After some thinking I came to conclusion that we try to approach the
> problem from the wrong end.
>
> It is clear that for distributed transaction we need some coordinator.
> I believe that we falsely have assumed that Firebird will also act as
> distributed transaction coordinator. In general this is wrong,
> Firebird is just another resource manager enlisted in distributed
> transaction.
>
> So, my suggestion to the problem with external datasources is the
> following:
>
> - we implement approach a) for "lightweight" cases.
> - for really distributed cases we make Firebird XA-compatible. I do
> not know what does it mean for C/C++ applications, for Java
> applications it means :
> - internal transactions are mapped to a global one which is
> identified by Xid.
> - resource manager provides methods described in b) that takes Xid
> as parameter.
>
> For Firebird that would mean:
>
> - we have to provide internal mapping between Xid and isc_tr_handle
> (pretty easy thing);
>
> - we have to provide implementation of the above mentioned methods
> (also easy thing from my point of view);
>
> - for each external procedure we provide access to Xid corresponding
> to the distributed transaction in context of which this procedure is
> executed. It is responsibility of the procedure (or more correctly,
> external datasource resource manager) to allocate connection and
> enlist it in the global transaction. Rest of the transaction handling
> logic will be handled by external distributed transaction coordinator.
>
> Opinions?
>
> Roman
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>