From: Hancock, D. \(DHANCOCK\) <DHA...@ar...> - 2005-03-16 17:20:36
|
Geoff: Thanks very much for the authoritative information. We are going to switch to Memory as soon as possible. I'm assuming that Dynamic has the same semantics as Memory and also shares the session data across servlets. Our users DO have several windows open at once with different servlets, so it's entirely possible that we've been causing them problems with File sessions. Again, thanks. Cheers! -- David Hancock | dha...@ar... | 410-266-4384=20 -----Original Message----- From: Geoffrey Talvola [mailto:gta...@na...]=20 Sent: Wednesday, March 16, 2005 10:42 AM To: Hancock, David (DHANCOCK); web...@li... Subject: RE: [Webware-discuss] RE: Expiration problem after switching to Dynamic sessions Hancock, David wrote: > New question, similar to the old question: Are there some > semantic differences in how in-memory sessions=20 > are handled vs. file-based sessions? Yes, there are important differences between the two if there are multiple servlets simultaneously accessing the same session. With in-memory sessions, one servlet immediately sees the changes made by another servlet since there is only one copy of the session object, shared among all servlets. With file-based sessions, however, each servlet has a _separate_ copy of the session object loaded from the pickle on disk as needed, and that data is pickled back to disk at the end of the transaction, WIPING OUT ANY CHANGES that were made in the session by another servlet. This can lead to unpredicable buggy behavior if you are not careful. I feel that the Memory session store leads to more predictable behavior, so that's what I would recommend using in most cases. - Geoff |