Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • 4
    Why can't the main thread just put the request to the queue? What happens if 1000 long requests arrive to the main thread, and you don't want to start 1000 threads? How does a thread pool fit into this picture? I think your options need a bit more of further contemplation. Commented Aug 5, 2015 at 19:17
  • 1
    Doing your own multi-threading in a container is typically something that is to be avoided. Java EE specification and multi threading, Why is spawning threads in Java EE container discouraged? Commented Aug 5, 2015 at 19:36