In my understanding, Tomcat is allowed to collect as many copies of the servlet as it wants to serve requests.
This causes my servlets to not have a severe state and instead store all the state in the context (singleton) of the servlet.
Is it possible to configure Tomcat to treat my servlets as single elements and always lift exactly one servlet instance regardless of load?
According to the servlet specification (v2.4, section 2.2 "Number of Instances"):
SRV.2.2 Number of instances, ( ), . SingleThreadModel, .
SRV.2.2 Number of instances
, ( ), . SingleThreadModel, .
SingleThreadModel
: SingleThreadModel web.xml.
web.xml
, Servlet, , , , .. , 't , , Session ( Request).
... ? " " - .
, . tomcat , JavaEE . , , MVC .
, , , singleton, .
, . , . . , . , , , .
. .
: , , X, , . .
Source: https://habr.com/ru/post/1714316/More articles:pthread_key_t and pthread_once_t? - c ++How to add thousands of delimiters with reg ex? - regexProblem with DevExpress LookUpEdit - data-bindingIPhone Icon - Red Indicators # - iphoneWPF - why does this EventTrigger not work? - wpfPerformance and load control ColdFusion 8 - javaColdFusion Customer Storage - coldfusionGetting return value python script - pythonUnauthorizedAccessException when using Directory.GetFiles - c #What can cause a two minute delay when calling a web service? - performanceAll Articles