https://issues.apache.org/jira/browse/AMQ-3038 - delete temp destinations when connection is closed

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1061365 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Bosanac Dejan 2011-01-20 16:11:29 +00:00
parent 9c78797f5d
commit 4e33fb114b
1 changed files with 8 additions and 0 deletions

View File

@ -643,6 +643,14 @@ public class ActiveMQConnection implements Connection, TopicConnection, QueueCon
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