Skip to content
Permalink
Browse files
This closes #4086
  • Loading branch information
jbertram committed May 23, 2022
2 parents 41d5ba7 + 466597e commit a92e649dda70d880eb0a37714ee727e2c24d3226
Showing 4 changed files with 28 additions and 0 deletions.
@@ -32,6 +32,12 @@ public interface ActiveMQServerControl {
String ADDRESS_MEMORY_USAGE_PERCENTAGE_DESCRIPTION = "Memory used by all the addresses on broker as a percentage of the global-max-size";
String DISK_STORE_USAGE_DESCRIPTION = "Fraction of total disk store used";

/**
* Returns this server's name.
*/
@Attribute(desc = "Server's name")
String getName();

/**
* Returns this server's version.
*/
@@ -204,6 +204,21 @@ public boolean isStarted() {
}
}

@Override
public String getName() {
if (AuditLogger.isBaseLoggingEnabled()) {
AuditLogger.getName(this.server);
}
checkStarted();

clearIO();
try {
return server.getConfiguration().getName();
} finally {
blockOnIO();
}
}

@Override
public String getVersion() {
if (AuditLogger.isBaseLoggingEnabled()) {
@@ -161,6 +161,8 @@ public boolean usingCore() {
public void testGetAttributes() throws Exception {
ActiveMQServerControl serverControl = createManagementControl();

Assert.assertEquals(server.getConfiguration().getName(), serverControl.getName());

Assert.assertEquals(server.getVersion().getFullVersion(), serverControl.getVersion());

Assert.assertEquals(conf.isClustered(), serverControl.isClustered());
@@ -587,6 +587,11 @@ public long getTransactionTimeoutScanPeriod() {
return (Long) proxy.retrieveAttributeValue("transactionTimeoutScanPeriod", Long.class);
}

@Override
public String getName() {
return (String) proxy.retrieveAttributeValue("name");
}

@Override
public String getVersion() {
return proxy.retrieveAttributeValue("version").toString();

0 comments on commit a92e649

Please sign in to comment.