activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r382353 - in /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq: broker/jmx/ManagedRegionBroker.java broker/region/RegionBroker.java util/SubscriptionKey.java
Date Thu, 02 Mar 2006 11:28:51 GMT
Author: rajdavies
Date: Thu Mar  2 03:28:40 2006
New Revision: 382353

URL: http://svn.apache.org/viewcvs?rev=382353&view=rev
Log:
Fixed some npe I'd just introduced

Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedRegionBroker.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/RegionBroker.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/SubscriptionKey.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedRegionBroker.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedRegionBroker.java?rev=382353&r1=382352&r2=382353&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedRegionBroker.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedRegionBroker.java
Thu Mar  2 03:28:40 2006
@@ -129,7 +129,6 @@
     }
 
     public void registerSubscription(ConnectionContext context,Subscription sub){
-       // NEED CONTEXT TO GET CLIENT ID AND USE Subscription KEY!!!
         SubscriptionKey key = new SubscriptionKey(context.getClientId(),sub.getConsumerInfo().getSubcriptionName());
         Hashtable map=new Hashtable(brokerObjectName.getKeyPropertyList());
         map.put("Type",JMXSupport.encodeObjectNamePart("Subscription"));

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/RegionBroker.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/RegionBroker.java?rev=382353&r1=382352&r2=382353&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/RegionBroker.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/RegionBroker.java
Thu Mar  2 03:28:40 2006
@@ -90,7 +90,7 @@
     public RegionBroker(BrokerService brokerService,TaskRunnerFactory taskRunnerFactory,
UsageManager memoryManager, PersistenceAdapter adapter, PolicyMap policyMap) throws IOException
{
         this.brokerService = brokerService;
         this.sequenceGenerator.setLastSequenceId( adapter.getLastMessageBrokerSequenceId()
);
-        this.adaptor = adaptor;
+        this.adaptor = adapter;//weird - both are valid spellings ...
         queueRegion = createQueueRegion(memoryManager, taskRunnerFactory, adapter, policyMap);
         topicRegion = createTopicRegion(memoryManager, taskRunnerFactory, adapter, policyMap);
         

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/SubscriptionKey.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/SubscriptionKey.java?rev=382353&r1=382352&r2=382353&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/SubscriptionKey.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/SubscriptionKey.java
Thu Mar  2 03:28:40 2006
@@ -31,8 +31,8 @@
 
     public SubscriptionKey(String clientId, String subscriptionName) {
         this.clientId = clientId;
-        this.subscriptionName = subscriptionName;
-        hashValue = clientId.hashCode()^subscriptionName.hashCode();
+        this.subscriptionName = subscriptionName != null? subscriptionName : "NOT_SET";
+        hashValue = clientId.hashCode()^this.subscriptionName.hashCode();
     }
 
 



Mime
View raw message