activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r636930 - in /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker: BrokerService.java cluster/ConnectionSplitBroker.java
Date Fri, 14 Mar 2008 00:04:35 GMT
Author: rajdavies
Date: Thu Mar 13 17:04:32 2008
New Revision: 636930

URL: http://svn.apache.org/viewvc?rev=636930&view=rev
Log:
monitor connection splits is now on by default

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/cluster/ConnectionSplitBroker.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java?rev=636930&r1=636929&r2=636930&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
Thu Mar 13 17:04:32 2008
@@ -164,7 +164,7 @@
     private int producerSystemUsagePortion = 60;
     private int consumerSystemUsagePortion = 40;
     private boolean splitSystemUsageForProducersConsumers;
-    private boolean monitorConnectionSplits;
+    private boolean monitorConnectionSplits=true;
     private int taskRunnerPriority = Thread.NORM_PRIORITY;
     private boolean dedicatedTaskRunner;
     private boolean cacheTempDestinations=true;//useful for failover

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/cluster/ConnectionSplitBroker.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/cluster/ConnectionSplitBroker.java?rev=636930&r1=636929&r2=636930&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/cluster/ConnectionSplitBroker.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/cluster/ConnectionSplitBroker.java
Thu Mar 13 17:04:32 2008
@@ -49,25 +49,27 @@
             if (info.isNetworkSubscription()) {
                 networkConsumerList.add(info);
             } else {
-                List<ConsumerInfo> gcList = new ArrayList<ConsumerInfo>();
-                for (ConsumerInfo nc : networkConsumerList) {
-                    if (!nc.isNetworkConsumersEmpty()) {
-                        for (ConsumerId id : nc.getNetworkConsumerIds()) {
-                            if (id.equals(info.getConsumerId())) {
-                                nc.removeNetworkConsumerId(id);
-                                if (nc.isNetworkConsumersEmpty()) {
-                                    gcList.add(nc);
+                if(!networkConsumerList.isEmpty()) {
+                    List<ConsumerInfo> gcList = new ArrayList<ConsumerInfo>();
+                    for (ConsumerInfo nc : networkConsumerList) {
+                        if (!nc.isNetworkConsumersEmpty()) {
+                            for (ConsumerId id : nc.getNetworkConsumerIds()) {
+                                if (id.equals(info.getConsumerId())) {
+                                    nc.removeNetworkConsumerId(id);
+                                    if (nc.isNetworkConsumersEmpty()) {
+                                        gcList.add(nc);
+                                    }
                                 }
                             }
+                        } else {
+                            gcList.add(nc);
                         }
-                    } else {
-                        gcList.add(nc);
                     }
-                }
-                for (ConsumerInfo nc : gcList) {
-                    networkConsumerList.remove(nc);
-                    super.removeConsumer(context, nc);
-                    LOG.warn("Removed stale network consumer" + nc);
+                    for (ConsumerInfo nc : gcList) {
+                        networkConsumerList.remove(nc);
+                        super.removeConsumer(context, nc);
+                        LOG.warn("Removed stale network consumer " + nc);
+                    }
                 }
             }
         }



Mime
View raw message