@ -989,7 +989,9 @@ public class DefaultMessageListenerContainer extends AbstractPollingMessageListe
@@ -989,7 +989,9 @@ public class DefaultMessageListenerContainer extends AbstractPollingMessageListe
}
else{
try{
Thread.sleep(interval);
synchronized(this.lifecycleMonitor){
this.lifecycleMonitor.wait(interval);
}
}
catch(InterruptedExceptioninterEx){
// Re-interrupt current thread, to allow other threads to react.
@ -1057,9 +1059,9 @@ public class DefaultMessageListenerContainer extends AbstractPollingMessageListe
@@ -1057,9 +1059,9 @@ public class DefaultMessageListenerContainer extends AbstractPollingMessageListe
catch(Throwableex){
clearResources();
if(!this.lastMessageSucceeded){
// We failed more than once in a row or on startup - sleep before
// first recovery attempt.
sleepBeforeRecoveryAttempt();
// We failed more than once in a row or on startup -
// wait before first recovery attempt.
waitBeforeRecoveryAttempt();
}
this.lastMessageSucceeded=false;
booleanalreadyRecovered=false;
@ -1214,11 +1216,11 @@ public class DefaultMessageListenerContainer extends AbstractPollingMessageListe
@@ -1214,11 +1216,11 @@ public class DefaultMessageListenerContainer extends AbstractPollingMessageListe