Java Servlets threading model

前端 未结 3 1217
孤城傲影
孤城傲影 2021-02-13 03:49

I was wondering if anybody could explains me the threading model of Java Servlets? As I understood about that, there is only one instance of a servlet can be existed in the serv

3条回答
  •  感动是毒
    2021-02-13 03:52

    Historically you had two models, depending on your Servlet. If the Servlet implemented SingleThreadModel, then the requests where queued. Otherwise, and this is the only model now, a Servlet must be able to serve multiple requests at the same time. So there is no queueing in that model, unless the container has some rate-limiting functionnality.

提交回复
热议问题