Java Servlets threading model

前端 未结 3 1219
孤城傲影
孤城傲影 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 04:02

    yes,there is a interface single thread model .it is a marker interface. it makes this object of servlet synchronized i.e at a time only one thread serve the object.but it create the problems like response delay.for solution they create pool of objects but again pool also has limited size.so it is better to use synchronized block

提交回复
热议问题