Martin,

   Cookies are, I believe, unique to the machine or at least the
directory where the browser is installed.  So multiple instances of the
browser from the same install share the same cookie.

   On the other side, you don't need multiple browsers to generate
multiple HTTP requests that overlap.  Simply hit the reload button
twenty times and your servlet will be running 20 threads all trying to
serve the same stuff for the same session to the same browser.

   This second situation can be prevented by blocking subsequent threads
from entering the session until the thread that has entered has exited.
But in your case, because of the cookie thing, I'm not sure that would
make a difference in behavior for you.

David

Martin Eberle wrote:
>
> !! A user opens two instances of the same browser !!
>
> So there can be two ore more call's to a servlet (with the same
> sessiondata) !!
> ->That means: What about the members of helper-classes ?
>  -> how can I synchronize this situation ?
>
> Specific problem:
> My servlets serve as an ecommerce-system:
> 1. To navigate through the resultset of a database-query I set a cookie
> (identifies set of products) to the client
> 2. The user post two simultanious querys -> the slower query-process
> sets the final cookie.
> 3. So the user navigate in both browser windows throw the same set of
> products!
>
> thanks martin
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to