activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r384223 - /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/TopicView.java
Date Wed, 08 Mar 2006 14:36:36 GMT
Author: jstrachan
Date: Wed Mar  8 06:36:35 2006
New Revision: 384223

URL: http://svn.apache.org/viewcvs?rev=384223&view=rev
Log:
added fix for NPE when adding durable subscribers

Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/TopicView.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/TopicView.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/TopicView.java?rev=384223&r1=384222&r2=384223&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/TopicView.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/TopicView.java
Wed Mar  8 06:36:35 2006
@@ -15,11 +15,13 @@
 
 import org.apache.activemq.broker.ConnectionContext;
 import org.apache.activemq.broker.region.Topic;
+import org.apache.activemq.command.ConsumerId;
 import org.apache.activemq.command.ConsumerInfo;
 import org.apache.activemq.command.RemoveSubscriptionInfo;
+
 public class TopicView extends DestinationView implements TopicViewMBean{
     
-    public TopicView(ManagedRegionBroker broker, Topic destination){
+     public TopicView(ManagedRegionBroker broker, Topic destination){
         super(broker, destination);
     }
 
@@ -28,6 +30,11 @@
         context.setBroker(broker);
         context.setClientId(clientId);
         ConsumerInfo info = new ConsumerInfo();
+        ConsumerId consumerId = new ConsumerId();
+        consumerId.setConnectionId(clientId);
+        consumerId.setSessionId(0);
+        consumerId.setValue(0);
+        info.setConsumerId(consumerId);
         info.setDestination(destination.getActiveMQDestination());
         info.setSubcriptionName(subscriberName);
         broker.addConsumer(context, info);



Mime
View raw message