I have a jetty server which is configured to expire requests after 30 seconds, this is the configuration line in the xml config file:
<Set name="maxIdleTime">30000</Set>
There are two kinds of requests that are accepted by this server: requests which have to be served in real time and requests that come from batch scripts that can take their time to be answered.
One request in particular is expected to take up to some minutes. Now I would like to allow this request to execute in full without timing out, while keeping expiration time for "normal" real time requests low, in order to avoid potential congestions.
My guess is that I would have to do something like this:
public class MyServlet extends HttpServlet {
...
public void doGet(HttpServletRequest pRequest, HttpServletResponse pResponse)
throws IOException, ServletException {
if (pRequest is of the type allowed to be slow) {
set max idle time for this request very high (or infinite)
}
server.execute(pRequest, pResponse);
}
}
I'm using jetty 6.1.2rc4