Hancock, David wrote:
> New question, similar to the old question: Are there some
> semantic differences in how in-memory sessions
> 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.
Hancock, David (DHANCOCK) wrote:
> 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.
Yes, Dynamic should work the same as Memory -- there will only be one copy
of the session object in memory, shared across all servlets. This is true
of Webware from Subversion but may not be true in Webware 0.8.1; I think the
code has been improved since then.