I remember in a thread Mr.Bear told," Modifying values in session and application scope can also create Thread safety issues ".
"Modifying values in session" means what type of values he means here.Can anyone tell me..
If all the requests are just reading (not modifying) session data - no problem
I think that I found the source where this problem was explained in great details: Head First Servlets & JSP by Bryan Basham, Kathy Sierra, Bert Bates - Second Edition - Chapter 5 Being a Web App - page 200
The title of the page is: Protect session attributes by synchronizing on the HttpSession.
vipul bondugula wrote:Each user will have his own session to interact with the server.
There will be no multiple users interacting in a single session with the server.
This means , we no need to synchronize session.
Correct me if iam wrong.
You are wrong.
The same user can have multiple requests coming into the server at the same time by way of Ajax requests, multiple browser windows, framesets, iframes, and the like.
If these requests are all reading and writing values to the session, there can be contention issues.