ARTEMIS-4652 When the error is of type XAER_NOTA we shouldn't close the connection in case some recovery is happening.

Signed-off-by: Emmanuel Hugonnet <ehugonne@redhat.com>
This commit is contained in:
Emmanuel Hugonnet 2024-03-22 09:30:43 +01:00 committed by clebertsuconic
parent baa8710fa2
commit a128e46337
1 changed files with 4 additions and 3 deletions

View File

@ -399,9 +399,10 @@ public class ActiveMQXAResourceWrapper implements XAResource, SessionFailureList
*/
protected XAException check(final XAException e) throws XAException {
ActiveMQXARecoveryLogger.LOGGER.xaRecoveryError(e);
// If any exception happened, we close the connection so we may start fresh
close();
if (e.errorCode != XAException.XAER_NOTA) {
// If any exception happened, we close the connection so we may start fresh
close();
}
throw e;
}