Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

sharing the session object  RSS feed

 
Raj chiru
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi....
session object is not thread-safe right?,so Is it possible to share the session object between the threads?
 
Mark Spritzler
ranger
Sheriff
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Session is one to one with Transaction and User. So I would think that whatever you think you need to share the session for, there is a much cleaner better solution for you. If you want to share loaded data amongst users, look into using a second level cache like EHCache, JBoss Cache, or TerraCotta.

Mark
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!