context = createCometContext(httpServletRequest.getSession().getId());
final ReflectorCometHandler handler = new ReflectorCometHandler(true);
context.addCometHandler(handler);
if (!queue.messagesWaiting()) {
queue.setActivationCallback(new QueueActivationCallback() {
public void activate(MessageQueue queue) {
queue.setActivationCallback(null);
context.resumeCometHandler(handler);
try {