diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/region/RegionBroker.java b/activemq-core/src/main/java/org/apache/activemq/broker/region/RegionBroker.java index f8f2b3123c..830ccf535d 100755 --- a/activemq-core/src/main/java/org/apache/activemq/broker/region/RegionBroker.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/region/RegionBroker.java @@ -30,7 +30,6 @@ import java.util.concurrent.ThreadPoolExecutor; 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 EmptyBroker { 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 EmptyBroker { } - 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);