added patch for AMQ-835 - many thanks Ozgur Cetinturk

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@423797 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
James Strachan 2006-07-20 06:13:43 +00:00
parent 1bcd631bf9
commit ea35563b49
1 changed files with 43 additions and 39 deletions

View File

@ -529,6 +529,7 @@ public class ActiveMQConnection implements Connection, TopicConnection, QueueCon
public void close() throws JMSException {
checkClosed();
try {
// If we were running, lets stop first.
stop();
@ -558,7 +559,6 @@ public class ActiveMQConnection implements Connection, TopicConnection, QueueCon
c.dispose();
}
if (isConnectionInfoSentToBroker) {
syncSendPacket(info.createRemoveCommand(), closeTimeout);
}
@ -577,6 +577,10 @@ public class ActiveMQConnection implements Connection, TopicConnection, QueueCon
}
}
}
finally {
factoryStats.removeConnection(this);
}
}
/**
* Tells the broker to terminate its VM. This can be used to cleanly