Best Practice 5 Do Not Use SingleThreadModel

zhaozj2021-02-17  52

Best Practice 5 Do Not Use SingleThreadModel

SingLethreadModel is a tag interface, which is implemented by a servlet and moves the Reentrance to the servlet engine. Similarly, Javax.Servlet.singLethReadModel is part of the J2EE specification. WebSphere processes the Reentrance of Servlet by creating an instance of a separate servlet for each USER. Since this causes a lot of system load, SingLethreadModel should avoid use.

Typical developers will use Javax.Servlet.singLethReadModel to protect updatable servlet instances in a Multithreaded environment. A better way is to avoid using the servlet instance variable when updating data from the Servlet service.

转载请注明原文地址:https://www.9cbs.com/read-29698.html

New Post(0)