git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@937334 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Bosanac Dejan 2010-04-23 15:27:36 +00:00
parent 36cc71d077
commit 093c901329
3 changed files with 16 additions and 0 deletions

View File

@ -24,6 +24,8 @@ import java.net.URI;
import java.net.URL;
import java.util.concurrent.atomic.AtomicInteger;
import javax.management.ObjectName;
import org.apache.activemq.ActiveMQConnectionMetaData;
import org.apache.activemq.broker.Broker;
import org.apache.activemq.broker.BrokerService;
import org.apache.activemq.broker.ConnectionContext;
@ -67,6 +69,10 @@ public class BrokerView implements BrokerViewMBean {
return broker.getBrokerName();
}
public String getBrokerVersion() {
return ActiveMQConnectionMetaData.PROVIDER_VERSION;
}
public void gc() throws Exception {
brokerService.getBroker().gc();
}

View File

@ -38,6 +38,12 @@ public interface BrokerViewMBean extends Service {
@MBeanInfo("The name of the broker.")
String getBrokerName();
/**
* @return The name of the broker.
*/
@MBeanInfo("The version of the broker.")
String getBrokerVersion();
/**
* The Broker will fush it's caches so that the garbage collector can
* recalaim more memory.

View File

@ -38,6 +38,10 @@ You can find more information about ActiveMQ on the <a href="http://activemq.apa
<td>Name</td>
<td><b>${requestContext.brokerQuery.brokerAdmin.brokerName}</b></td>
</tr>
<tr>
<td>Version</td>
<td><b>${requestContext.brokerQuery.brokerAdmin.brokerVersion}</b></td>
</tr>
<tr>
<td>ID</td>
<td><b>${requestContext.brokerQuery.brokerAdmin.brokerId}</b></td>