java - Is SpringMVC works on Single Thread Model or Multithread Model? -
I have confusion about single thread model and multithread model.
If you mean "Does Spring MVC implement the javax.servlet.SingleThreadModel Interface?" It is not.
The single thread model guarantees that "servlet handle only one request at a time." (From API Docs). It is usually managed by the servlet container, which will maintain a pool of servlet instances and will allocate for each incoming request. It is a rarely used model of execution, and the interface itself is disliked as Java Servlet API 2.4, no direct replacement.
With Spring MVC, you should consider that your administrator has more than one request at one time, which makes it your responsibility to ensure that your processing thread is secure.
Comments
Post a Comment