This article might be helpful:
Asynchronous processing support in Servlet 3.0 by Dr. Xinyu Liu
In short, it explains that for Ajax (Comet, Long Polling) the new Async support in Servlet 3.0 specification can be used to implement a delayed answer (HTTP response) when there are new messages available on the server.
Instead of sleeping, the code (on page 2) uses a ConcurrentLinkedQueue to store messages, and then invokes its poll() method to wait for new messages.
This article also explains that this new Async support helps to reduce resource usage, because the original threads initiating the request/response loop are immediately returned to the thread pool and ready to serve other tasks.
At the moment I am working on a Ajax long polling demo based on GlassFish 4, a message driven bean (JMS), and JavaServer Faces, so I found your question here, and will come back if I find more helpful information or example code.
See also: I don't understand Async support in servlets 3.0 API