activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r393051 - /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/RegionBroker.java
Date Mon, 10 Apr 2006 20:39:01 GMT
Author: rajdavies
Date: Mon Apr 10 13:39:00 2006
New Revision: 393051

URL: http://svn.apache.org/viewcvs?rev=393051&view=rev
Log:
don't throw excpetion if directory doesn't exist when removing

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

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=393051&r1=393050&r2=393051&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
Mon Apr 10 13:39:00 2006
@@ -211,28 +211,27 @@
         return answer;
     }
 
-    public void removeDestination(ConnectionContext context, ActiveMQDestination destination,
long timeout) throws Exception {
-        if( !destinations.contains(destination) )
-            throw new JMSException("Destination does not exist: "+destination);
-        
-        switch(destination.getDestinationType()) {
-        case ActiveMQDestination.QUEUE_TYPE:
-            queueRegion.removeDestination(context, destination, timeout);
-            break;
-        case ActiveMQDestination.TOPIC_TYPE:
-            topicRegion.removeDestination(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);
+    public void removeDestination(ConnectionContext context,ActiveMQDestination destination,long
timeout)
+                    throws Exception{
+        if(destinations.contains(destination)){
+            switch(destination.getDestinationType()){
+            case ActiveMQDestination.QUEUE_TYPE:
+                queueRegion.removeDestination(context,destination,timeout);
+                break;
+            case ActiveMQDestination.TOPIC_TYPE:
+                topicRegion.removeDestination(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);
+            }
+            destinations.remove(destination);
         }
-        
-        destinations.remove(destination);
     }
     
     public void addDestinationInfo(ConnectionContext context,DestinationInfo info) throws
Exception{



Mime
View raw message