Hello all -

A question regarding sessions:
Assume that sessions are tracked in a web application, ie. 
request.getSession(true) is used to grab sessions.  Now, a client makes 2 
or concurrent requests to a servlet after a session has been established, 
say by hitting a submit button twice on a form.  Within the doPost method 
which of the following is true:

1)  Both calls to request.getSession(true) return the exact same object
2)  Both calls to request.getSession(true) return two different session 
objects that contain the same information.

I need to be able to synchronized actions at a client level, so that if two 
requests come from the same client they execute serially, but two requests 
come from two different clients, they can interact concurrently.  The only 
way I could think to do this was with a synchronized block on 
HttpSession.  This won't work, however, if each request creates a new 
HttpSession per request.   The api doesn't specify behavior that I could 
see.....

Thanks for the insight.
Rebekah
Rebekah Lepro - [EMAIL PROTECTED]
Applied Research Laboratory
The Pennsylvania State University
P.O. Box 30, State College PA 16804
Phone: +1-814-863-8122 Fax: +1-814-863-1183

Reply via email to