Will both the browers will send the same sessionID?
According to me, this question will determine whether the session objects are thread safe.
Same Browser(IE) - will result in a new session or not(i.e will share cookies or not), depending on how the second browser instance was opened. In case of IE, if you open a new browser instance by hitting hit ctrl-N, ctrl-T(new tab); the second browser instance will share cookies/sessions etc. But if you go via Program Files > IE, then the second browser instance will result in new sessions/cookies.
imagine a user opens two windows from the same client and sends a delete request from one and insert from the other at nearly the same time. may result in inconsistent data
there will be multiple requests using the same session object.
Even if the session object is thread-safe, that doesn't imply that all objects you access through it (like session attributes) are thread-safe; as a matter of fact, they're not
You only need to worry about the multi threaded behaviour of the HTTPSession if you have two threads accessing the same session attribute from the same browser instance. In normal web applications this should never happen
carox kaur wrote:
Ulf Dittmer wrote:Even if the session object is thread-safe, that doesn't imply that all objects you access through it (like session attributes) are thread-safe; as a matter of fact, they're not
How? If the session object is thread safe, then this means that the object will be accessible to only one thread at a time, true?
If this object is accessible to only one thread at a time, then only one thread will be able to make updations in the attributes in it at a time.