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