From 2f0ac0e06952a0e1b7b2abed00103925620e7944 Mon Sep 17 00:00:00 2001 From: Matt Pavlovich Date: Tue, 22 Aug 2023 16:26:00 -0500 Subject: [PATCH] [AMQ-9301] Add additional fields to o.a.activemq.broker.jmx.Connection (cherry picked from commit 9f374dfcb50729693ae1ee55d58bfea27fef1c0a) --- .../activemq/broker/jmx/ConnectionView.java | 15 +++++++++++++++ .../broker/jmx/ConnectionViewMBean.java | 17 +++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/ConnectionView.java b/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/ConnectionView.java index 880790dfa2..937b4c079c 100644 --- a/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/ConnectionView.java +++ b/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/ConnectionView.java @@ -176,4 +176,19 @@ public class ConnectionView implements ConnectionViewMBean { public Long getOldestActiveTransactionDuration() { return connection.getOldestActiveTransactionDuration(); } + + @Override + public boolean isFaultTolerantConnection() { + return connection.isFaultTolerantConnection(); + } + + @Override + public boolean isManageable() { + return connection.isManageable(); + } + + @Override + public boolean isNetworkConnection() { + return connection.isNetworkConnection(); + } } diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/ConnectionViewMBean.java b/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/ConnectionViewMBean.java index cd1210ae13..a0e399a13f 100644 --- a/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/ConnectionViewMBean.java +++ b/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/ConnectionViewMBean.java @@ -116,4 +116,21 @@ public interface ConnectionViewMBean extends Service { @MBeanInfo("The age in ms of the oldest active transaction established on this Connection.") public Long getOldestActiveTransactionDuration(); + /** + * @return true if the Connection is fault tolerant + */ + @MBeanInfo("Connection is fault tolerant.") + boolean isFaultTolerantConnection(); + + /** + * @return true if the Connection is manageable + */ + @MBeanInfo("Connection is manageable.") + boolean isManageable(); + + /** + * @return true if the Connection is a network connection + */ + @MBeanInfo("Connection is a network connection.") + boolean isNetworkConnection(); }