pgjdbc/pgjdbc GitHub issues and pull requests (mirror)
help / color / mirror / Atom feedFrom: denis-anisimov (@denis-anisimov) <[email protected]>
To: pgjdbc/pgjdbc <[email protected]>
Subject: Re: [pgjdbc/pgjdbc] PR #4114: fix: PGXAConnection no longer saves and restores the caller's autoCommit
Date: Wed, 27 May 2026 09:11:57 +0000
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
The original problem has been discovered with the driver using it with Geronimo as a TM inside TomEE.
If DataSource is configured using `DefaultAutoCommit false` property then method `XAResource::recover` begins a transaction with the previous driver version. And then it becomes impossible to complete recovery using methods "commit"/"rollback" since there is a check in the method "commitPrepared" against the opened transaction.
It throws XAException with RMERR ("-3" ) error code which is fatal for the TM, it may not be handled properly in any way.
Now the latest driver version with this fix is tested and there are no regressions noticed and the behavior of the "XAResource::recover" method is correct: there is no transaction anymore.
Also the check in the "commitPrepared" method is corrected and it throws now RMFAIL ("-7") error which Geronimo TM handles properly.
view thread (13+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: github://pgjdbc/pgjdbc
Cc: [email protected], [email protected]
Subject: Re: [pgjdbc/pgjdbc] PR #4114: fix: PGXAConnection no longer saves and restores the caller's autoCommit
In-Reply-To: <<[email protected]>>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox