Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

servlet thread safe when sending large file

 
jawa lal
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have servlet which gets large data files , depending on request to the client, while this be thread safe, how to make it thread safe other than using SingleThread interface
 
ersin eser
Ranch Hand
Posts: 1072
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry but I did not understand your question...
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13056
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just like all servlets, the rule is you must use only local variables to be Thread safe. The amount of time the transaction takes doesn't matter. I would worry more about access to the file by other Threads.
Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic