File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Which Attribute Scopes Are Thread-Safe?

 
JiaPei Jen
Ranch Hand
Posts: 1309
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which ones of the following are thread-safe ( with my tempted answers )? Please kindly correct me with reasons.
1. local variable: yes
2. instance variable: no
3. class variable: no
4. request attribute: no
5. session attribute: yes
6. context aattribute: no
 
Rama Raghavan
Ranch Hand
Posts: 116
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my quest for knowledge I think -
If you implement SingleThreadModel then class variable would be thread safe (but not instance variable).
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic