fix for AMQ-627 to always catch and deal with interupted exceptions

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@386586 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
James Strachan 2006-03-17 09:15:38 +00:00
parent 15550b812a
commit cfbb3c852a
2 changed files with 5 additions and 3 deletions

View File

@ -229,10 +229,12 @@ public class ActiveMQQueueBrowser implements
*/ */
protected void waitForMessage() { protected void waitForMessage() {
try { try {
synchronized (semaphore ) { synchronized (semaphore) {
semaphore.wait(2000); semaphore.wait(2000);
} }
} catch (InterruptedException e) { }
catch (InterruptedException e) {
Thread.currentThread().interrupt();
} }
} }

View File

@ -69,7 +69,7 @@ public class ResponseHolder {
lock.wait(timeout); lock.wait(timeout);
} }
catch (InterruptedException e) { catch (InterruptedException e) {
e.printStackTrace(); Thread.currentThread().interrupt();
} }
} }
} }