activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dej...@apache.org
Subject svn commit: r1061365 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java
Date Thu, 20 Jan 2011 16:11:30 GMT
Author: dejanb
Date: Thu Jan 20 16:11:29 2011
New Revision: 1061365

URL: http://svn.apache.org/viewvc?rev=1061365&view=rev
Log:
https://issues.apache.org/jira/browse/AMQ-3038 - delete temp destinations when connection
is closed

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java?rev=1061365&r1=1061364&r2=1061365&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java
Thu Jan 20 16:11:29 2011
@@ -643,6 +643,14 @@ public class ActiveMQConnection implemen
                         c.dispose();
                     }
 
+                    // As TemporaryQueue and TemporaryTopic instances are bound
+                    // to a connection we should just delete them after the connection
+                    // is closed to free up memory
+                    for (Iterator<ActiveMQTempDestination> i = this.activeTempDestinations.values().iterator();
i.hasNext();) {
+                        ActiveMQTempDestination c = i.next();
+                        c.delete();
+                    }
+                    
                     if (isConnectionInfoSentToBroker) {
                         // If we announced ourselfs to the broker.. Try to let
                         // the broker



Mime
View raw message