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

Threadsafely of variables.

 
Siddharth Purandare
Ranch Hand
Posts: 101
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I was reading the thread safety of variables when we implement the SingleThreadModel interface and when we don�t implement the SingleThreadModel interface. The final conclusion is that only the request time variables and the local variables are thread safe and no other variables. That�s fine with me, no issues in that.

My doubt is that is that � Is StringBuffer variables thread safe irrespective of their position and irrespective of whether the class implements SingleThreadModel�??? (As the StringBuffer Class objects are threadsafe by default). Please clarify if I am wrong to interpret something.

Thanks in advance.
[ December 07, 2006: Message edited by: Siddharth Purandare ]
 
Celinio Fernandes
Ranch Hand
Posts: 549
Eclipse IDE Google Web Toolkit Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok, this is a redundant question.
Like I said before, SingleThreadModel is deprecated and no longer on the exam so you can forget about it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic