diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionImpl.java index 7bea6317de..36df058ce3 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionImpl.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionImpl.java @@ -1242,7 +1242,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi { ActiveMQClientLogger.LOGGER.debug("Error on rollback during end call!", ignored); } - throw new XAException(XAException.XA_RBOTHER); + throw new XAException(XAException.XAER_RMFAIL); } try @@ -1393,7 +1393,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi if (rollbackOnly) { - throw new XAException(XAException.XA_RBOTHER); + throw new XAException(XAException.XAER_RMFAIL); } // Note - don't need to flush acks since the previous end would have @@ -1437,7 +1437,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi ActiveMQClientLogger.LOGGER.errorDuringPrepare(e); - throw new XAException(XAException.XA_RBOTHER); + throw new XAException(XAException.XAER_RMFAIL); } ActiveMQClientLogger.LOGGER.errorDuringPrepare(e); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverTest.java index 745ee627c5..8115d82fcd 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverTest.java @@ -1185,7 +1185,7 @@ public class FailoverTest extends FailoverTestBase } catch (XAException e) { - Assert.assertEquals(XAException.XA_RBOTHER, e.errorCode); + Assert.assertEquals(XAException.XAER_RMFAIL, e.errorCode); } ClientConsumer consumer = session.createConsumer(FailoverTestBase.ADDRESS); @@ -1268,7 +1268,7 @@ public class FailoverTest extends FailoverTestBase } catch (XAException e) { - Assert.assertEquals(XAException.XA_RBOTHER, e.errorCode); + Assert.assertEquals(XAException.XAER_RMFAIL, e.errorCode); // XXXX session.rollback(); } @@ -1405,7 +1405,7 @@ public class FailoverTest extends FailoverTestBase } catch (XAException e) { - Assert.assertEquals(XAException.XA_RBOTHER, e.errorCode); + Assert.assertEquals(XAException.XAER_RMFAIL, e.errorCode); } } @@ -1491,7 +1491,7 @@ public class FailoverTest extends FailoverTestBase } catch (XAException e) { - Assert.assertEquals(XAException.XA_RBOTHER, e.errorCode); + Assert.assertEquals(XAException.XAER_RMFAIL, e.errorCode); } }