Re: XADataSource implementation

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Oliver Jowett <oliver(at)opencloud(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org, Michael Allman <msa(at)allman(dot)ms>
Subject: Re: XADataSource implementation
Date: 2005-09-12 20:43:08
Message-ID: Pine.OSF.4.61.0509122317420.222685@kosh.hut.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Mon, 12 Sep 2005, Oliver Jowett wrote:

> Heikki Linnakangas wrote:
>> I've been working on the XADataSource implementation. Patch attached.
>> Test case is in the separate zip file, because I couldn't get cvs to
>> include it in the diff.
>
> This looks good to me. A few comments:
>
> - we'll need to wrap translatable strings in GT.tr() calls

Ok.

> - there are some places where you compare Xids by identity (==) --
> shouldn't these be using .equals()?

Hmm. At those places, the user of the XAResource interface has supplied
both of the Xids being compared, within the same transaction. In
principle, I guess you're right. Nothing in the spec says that it's safe
to assume that the same Xid object is used for start/end/prepare calls.
I would be very surprised if it didn't work in practice, however.

I'll fix it. Premature optimization is not good..

> - do we really need all of that Base64 encoder/decoder class? Seems like
> we could get away with something much more simple.

Yeah, it's bloated for our purposes. I'll strip out all the gzip stuff
etc.

Thanks for your comments.

- Heikki

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Oliver Jowett 2005-09-12 21:59:57 Re: Strange behavoir of batches
Previous Message Angelo Neuschitzer 2005-09-12 10:56:27 Strange behavoir of batches