activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r1209058 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/RegionBroker.java
Date Thu, 01 Dec 2011 12:48:52 GMT
Author: gtully
Date: Thu Dec  1 12:48:51 2011
New Revision: 1209058

URL: http://svn.apache.org/viewvc?rev=1209058&view=rev
Log:
remove duplicate code removing advisories, handled cleanly in advisory broker already, additional
load on destination map. Only on remove dest opts through, so impact is mostly small. better
all the same. may lead to reduction in acces modes for the destination map

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/RegionBroker.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/RegionBroker.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/RegionBroker.java?rev=1209058&r1=1209057&r2=1209058&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/RegionBroker.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/RegionBroker.java
Thu Dec  1 12:48:51 2011
@@ -30,7 +30,6 @@ import java.util.concurrent.ThreadPoolEx
 import java.util.concurrent.locks.ReentrantReadWriteLock;
 import javax.jms.InvalidClientIDException;
 import javax.jms.JMSException;
-import org.apache.activemq.advisory.AdvisorySupport;
 import org.apache.activemq.broker.Broker;
 import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.broker.Connection;
@@ -326,17 +325,13 @@ public class RegionBroker extends EmptyB
             switch (destination.getDestinationType()) {
             case ActiveMQDestination.QUEUE_TYPE:
                 queueRegion.removeDestination(context, destination, timeout);
-                removeAdvisoryTopics("Queue.", context, destination, timeout);
                 break;
             case ActiveMQDestination.TOPIC_TYPE:
                 topicRegion.removeDestination(context, destination, timeout);
-                removeAdvisoryTopics("Topic.", context, destination, timeout);
                 break;
             case ActiveMQDestination.TEMP_QUEUE_TYPE:
-                tempQueueRegion.removeDestination(context, destination, timeout);
                 break;
             case ActiveMQDestination.TEMP_TOPIC_TYPE:
-                tempTopicRegion.removeDestination(context, destination, timeout);
                 break;
             default:
                 throw createUnknownDestinationTypeException(destination);
@@ -347,25 +342,6 @@ public class RegionBroker extends EmptyB
 
     }
 
-    public void removeAdvisoryTopics(String destinationType, ConnectionContext context, ActiveMQDestination
destination, long timeout) throws Exception {
-        if (this.brokerService.isAdvisorySupport()) {
-            String producerAdvisoryTopic = AdvisorySupport.PRODUCER_ADVISORY_TOPIC_PREFIX
+ destinationType + destination.getPhysicalName();
-            String consumerAdvisoryTopic = AdvisorySupport.CONSUMER_ADVISORY_TOPIC_PREFIX
+ destinationType + destination.getPhysicalName();
-
-            ActiveMQDestination dests[] = getDestinations();
-            for (ActiveMQDestination dest: dests) {
-                String name = dest.getPhysicalName();
-                if ( name.equals(producerAdvisoryTopic) || name.equals(consumerAdvisoryTopic)
) {
-                    try {
-                        removeDestination(context, dest, timeout);
-                    } catch (JMSException ignore) {
-                        // at least ignore the Unknown Destination Type JMSException
-                    }
-                }
-            }
-        }
-    }
-
     @Override
     public void addDestinationInfo(ConnectionContext context, DestinationInfo info) throws
Exception {
         addDestination(context, info.getDestination(),true);



Mime
View raw message