do best effort to drain the queues.. and error should not interrupt the connection and broker shutdown.

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@643205 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hiram R. Chirino 2008-03-31 23:15:45 +00:00
parent c20b10bed8
commit 431478a8f5
1 changed files with 11 additions and 8 deletions

View File

@ -142,6 +142,7 @@ public class ActiveMQTestCase extends TestCase
*/
protected void tearDown() throws Exception {
TextMessage msg;
try {
for (final Iterator i = consumersToEmpty.iterator(); i.hasNext();)
{
final MessageConsumer consumer = (MessageConsumer) i.next();
@ -150,6 +151,8 @@ public class ActiveMQTestCase extends TestCase
msg = (TextMessage) consumer.receive(RECEIVE_TIMEOUT);
while (msg != null);
}
} catch (Exception e) {
}
if (connection != null) {
connection.stop();
}