Re: a simple example of XA (not working) - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: a simple example of XA (not working)
Date
Msg-id Pine.BSO.4.64.0707061632580.10158@leary.csoft.net
Whole thread Raw
In response to Re: a simple example of XA (not working)  (Heikki Linnakangas <heikki@enterprisedb.com>)
List pgsql-jdbc

On Mon, 25 Jun 2007, Heikki Linnakangas wrote:

> Kris Jurka wrote:
>>
>> I don't think this fixes the problem completely if you have code that calls
>> XAConnection.getConnection more than once:
>>
>
> You got me at first, but actually the second getConnection call will *roll
> back* the first part of the transaction. See
> AbstractJdbc23PooledConnection.getConnection. I don't think that's a valid
> thing to do in the first place, though we could handle it more gracefully. I
> added a note of that in the comment in PGXAConnection.getConnection anyway.
>

OK.  I always have trouble remembering who does what with XA (TM vs
user), so in this case we can rely on the TM getting it right, while I was
thinking we had to prevent the user from getting it wrong.

Applied to 8.1, 8.2, and HEAD.

Kris Jurka

pgsql-jdbc by date:

Previous
From: Kris Jurka
Date:
Subject: Re: SSL support for javax.sql.DataSource
Next
From: "baisa, darwin"
Date:
Subject: Re: Connection is closed. Operation is not permitted. ------HELP....