The ProducerViewMBean should expose the ProducerId value.

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1134107 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Timothy A. Bish 2011-06-09 22:06:18 +00:00
parent a4b8c8ee1a
commit 6d48b4b077
2 changed files with 14 additions and 2 deletions

View File

@ -16,8 +16,6 @@
*/
package org.apache.activemq.broker.jmx;
import javax.jms.Destination;
import org.apache.activemq.command.ActiveMQDestination;
import org.apache.activemq.command.ProducerInfo;
@ -56,6 +54,14 @@ public class ProducerView implements ProducerViewMBean {
return 0;
}
@Override
public String getProducerId() {
if (info != null) {
return info.getProducerId().toString();
}
return "NOTSET";
}
@Override
public String getDestinationName() {
if (info != null && info.getDestination() != null) {

View File

@ -36,6 +36,12 @@ public interface ProducerViewMBean {
@MBeanInfo("ID of the Session the Producer is on.")
long getSessionId();
/**
* @return the id of Producer.
*/
@MBeanInfo("ID of the Producer.")
String getProducerId();
/**
* @return the destination name
*/