File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes session management technique Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "session management technique" Watch "session management technique" New topic

session management technique

ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
What's lacking in this session management technique?

Whenever we need to put something in session, we do:

And whenever we need to get from session:

Say 1000 users are hitting the site at the same time and same piece of code is getting executed for all 1000 users (requests) - they are doing the same thing. Now this code will be executed in 1000 threads - since request object is different for all 1000 threads, session object will also be different and there will not be any "clash" between users - and they will never access others' information.

Please let me know if my assumptions are not correct.

[ October 15, 2008: Message edited by: ankur rathi ]
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63866

It has nothing to do with the requests, but yes, each user will have their oun session.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: session management technique
It's not a secret anymore!