if (wait) {
synchronized (queue.getActivationLock()) {
final Continuation cont = ContinuationSupport.getContinuation(httpServletRequest, queue);
if (!cont.isResumed() && !queue.messagesWaiting()) {
queue.setActivationCallback(new JettyQueueActivationCallback(cont));
if (cont.suspend(30 * 1000)) {
return;
}
}