You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2011/06/10 00:06:19 UTC

svn commit: r1134107 - in /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx: ProducerView.java ProducerViewMBean.java

Author: tabish
Date: Thu Jun  9 22:06:18 2011
New Revision: 1134107

URL: http://svn.apache.org/viewvc?rev=1134107&view=rev
Log:
https://issues.apache.org/jira/browse/AMQ-3337

The ProducerViewMBean should expose the ProducerId value.

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ProducerView.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ProducerViewMBean.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ProducerView.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ProducerView.java?rev=1134107&r1=1134106&r2=1134107&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ProducerView.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ProducerView.java Thu Jun  9 22:06:18 2011
@@ -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;
 
@@ -57,6 +55,14 @@ public class ProducerView implements Pro
     }
 
     @Override
+    public String getProducerId() {
+        if (info != null) {
+            return info.getProducerId().toString();
+        }
+        return "NOTSET";
+    }
+
+    @Override
     public String getDestinationName() {
         if (info != null && info.getDestination() != null) {
             ActiveMQDestination dest = info.getDestination();

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ProducerViewMBean.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ProducerViewMBean.java?rev=1134107&r1=1134106&r2=1134107&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ProducerViewMBean.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ProducerViewMBean.java Thu Jun  9 22:06:18 2011
@@ -37,6 +37,12 @@ public interface ProducerViewMBean {
     long getSessionId();
 
     /**
+     * @return the id of Producer.
+     */
+    @MBeanInfo("ID of the Producer.")
+    String getProducerId();
+
+    /**
      * @return the destination name
      */
     @MBeanInfo("The name of the destionation the Producer is on.")