• Post Reply Bookmark Topic Watch Topic
  • New Topic

Thread safety with context attributes

 
Rachit Kumar Saxena
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well I read that context attributes arent thread safe.Any points to prove this!!!
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65519
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Page and request scoped variables are thread safe as only a single thread will ever have a reference to those scopes. Session and app scopes are available to multiple threads and must be considered when thinking about thread safety.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!