File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Synchronization

 
Krishna Srinivasan
Ranch Hand
Posts: 1862
Firefox Browser Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how can we acheive synchronization for service method in the servlet class.
if we r using SingleThreadModel, performance will be low than any other method to achieve that?
advance thanx.
 
Idly Vada
Ranch Hand
Posts: 135
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Instead of making the entire service method synchronized, enclose only the code that needs to be synchronized in a synchronized block.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic