diff --git a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/JMSBridge.java b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/JMSBridge.java index 1f9a08216e..a7e67c2379 100644 --- a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/JMSBridge.java +++ b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/JMSBridge.java @@ -90,9 +90,9 @@ public interface JMSBridge extends ActiveMQComponent { boolean isFailed(); - int getMessageCount(); + long getMessageCount(); - int getabortedMessageCount(); + long getAbortedMessageCount(); void setSourceConnectionFactoryFactory(ConnectionFactoryFactory cff); diff --git a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JMSBridgeImpl.java b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JMSBridgeImpl.java index 3ff639e55a..46cc0d492d 100644 --- a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JMSBridgeImpl.java +++ b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JMSBridgeImpl.java @@ -181,9 +181,9 @@ public final class JMSBridgeImpl implements JMSBridge { private ClassLoader moduleTccl; - private int message_count = 0; + private long messageCount = 0; - private int aborted_message_count = 0; + private long abortedMessageCount = 0; /* * Constructor for MBean @@ -492,7 +492,7 @@ public final class JMSBridgeImpl implements JMSBridge { try { tx.rollback(); - aborted_message_count += messages.size(); + abortedMessageCount += messages.size(); } catch (Exception ignore) { if (JMSBridgeImpl.trace) { @@ -780,13 +780,13 @@ public final class JMSBridgeImpl implements JMSBridge { } @Override - public synchronized int getMessageCount() { - return message_count; + public synchronized long getMessageCount() { + return messageCount; } @Override - public synchronized int getabortedMessageCount() { - return aborted_message_count; + public synchronized long getAbortedMessageCount() { + return abortedMessageCount; } @Override @@ -1214,7 +1214,7 @@ public final class JMSBridgeImpl implements JMSBridge { try { // Terminate the tx tx.rollback(); - aborted_message_count += messages.size(); + abortedMessageCount += messages.size(); } catch (Throwable ignore) { if (JMSBridgeImpl.trace) { @@ -1414,7 +1414,7 @@ public final class JMSBridgeImpl implements JMSBridge { try { // we call this just in case there is a failure other than failover tx.rollback(); - aborted_message_count += messages.size(); + abortedMessageCount += messages.size(); } catch (Throwable ignored) { } @@ -1511,7 +1511,7 @@ public final class JMSBridgeImpl implements JMSBridge { targetProducer.send(targetDestination, msg, msg.getJMSDeliveryMode(), msg.getJMSPriority(), timeToLive); if (msg != null) - message_count++; + messageCount++; if (JMSBridgeImpl.trace) { ActiveMQJMSBridgeLogger.LOGGER.trace("Sent message " + msg); }