Originally posted by Rakesh Sahadevan:
Is it possible to replace SingleThreaded model with synchronized keyword in service method?
Yes. Is it a good idea? No. If you implement the (deprecated) SingleThreadModel, the container will create as many instances of the
servlet as needed to handle the load. If you simply synchronize the service() method, you get just one instance, which might well become a bottleneck under high loads.
- Peter