Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

session attributes thread safe?

 
Bhumika Thakkar
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are session attributes thread safe with or w/o SingleThreadModel?
 
James Carman
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SingleThreadModel is deprecated. And, no, they're not thread-safe.
 
Bhumika Thakkar
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
even with SingleThreadModel, I dont see how they are thread safe. we could have 2 servlet instances both in one session. right?
 
James Carman
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Bhumika Thakkar:
even with SingleThreadModel, I dont see how they are thread safe. we could have 2 servlet instances both in one session. right?


Correct. There could still be multiple threads accessing the same exact session object.
[ May 06, 2005: Message edited by: James Carman ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic