aspose file tools*
The moose likes Servlets and the fly likes synchronization of servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "synchronization of servlet" Watch "synchronization of servlet" New topic
Author

synchronization of servlet

anish jain
Ranch Hand

Joined: Feb 03, 2010
Posts: 129
Please tell me the difference between synchronizing the service or doget or dopost methods and implementing SingleThreadModel
Which one is better?
I tried to google it but couldn't get the satisfactory answer?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42601
    
  65
They amount to the same thing - and both are awful; don't do either. Java has so many synchronization and concurrency features by now that destroying concurrency for all clients -which is what those two approaches do- is not necessary.


Ping & DNS - my free Android networking tools app
Kris Schneider
Ranch Hand

Joined: Feb 14, 2001
Posts: 71
There can be some fairly significant differences, like allowed servlet instance pooling, but SingleThreadModel was deprecated in Servlet 2.4...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: synchronization of servlet