This is an automated email from the ASF dual-hosted git repository.
clebertsuconic pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
The following commit(s) were added to refs/heads/main by this push:
new a128e46337 ARTEMIS-4652 When the error is of type XAER_NOTA we
shouldn't close the connection in case some recovery is happening.
a128e46337 is described below
commit a128e46337f65d82b38898df0042d65b22ae3ff2
Author: Emmanuel Hugonnet <[email protected]>
AuthorDate: Fri Mar 22 09:30:43 2024 +0100
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 <[email protected]>
---
.../service/extensions/xa/recovery/ActiveMQXAResourceWrapper.java | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git
a/artemis-service-extensions/src/main/java/org/apache/activemq/artemis/service/extensions/xa/recovery/ActiveMQXAResourceWrapper.java
b/artemis-service-extensions/src/main/java/org/apache/activemq/artemis/service/extensions/xa/recovery/ActiveMQXAResourceWrapper.java
index 219ec8c433..25cdbcc958 100644
---
a/artemis-service-extensions/src/main/java/org/apache/activemq/artemis/service/extensions/xa/recovery/ActiveMQXAResourceWrapper.java
+++
b/artemis-service-extensions/src/main/java/org/apache/activemq/artemis/service/extensions/xa/recovery/ActiveMQXAResourceWrapper.java
@@ -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;
}