Do not synchronize doGet, doPost

The servlet specification strongly recommends that doGet, doPost, and all other service methods should not be declared as synchronized.

Declaring such methods as synchronized will often decrease performance significantly. It is not necessary to declare these methods as synchronized at all, since this is taken care of by the servlet container itself.

Would you use this technique?
Yes   No   Undecided   
© 2010 Hirondelle Systems | Source Code | Contact | License | Quotes | RSS
Individual code snippets can be used under this BSD license - Last updated on June 5, 2010.
Over 150,000 unique IPs last month - Built with WEB4J.
- In Memoriam : Bill Dirani -