Community
Participate
Working Groups
Build Identifier: 6.1.21 Currently, the thread allocation model of Jetty is *per connection per thread*, so Jetty will assign one thread when a connection/request is coming, and this thread is responsible for read and process. Is it possible to have an extension point in SelectChannelEndPoint's run() to control the thread allocation. One use case is: I have one web service on http://localhost:7777/Web, and my web service will do some calculation for soap message. However, some calculation may become very slow (e.g. db outage) which could occupy all my Jetty thread. I would like to check the http request to find out if it is the request in question, if it is then I put it in a queue and do not dispatch it to thread-pool. In this way, we can avoid many threads working on the in-question soap request. David Reproducible: Always
If you use the select channel connector and continuations (or servlet 3.0 API in jetty-8), then you can suspend request handling and return the thread to the thread pool. Once a result is available, you can then resume the request and it will replay and serve the results. Google for "jetty continuation"
Thanks Greg. continuations api works for me. David
Resolved -> Closed