Message contexts and Spring Webflow conversation scope
Brent Putman
putmanb at georgetown.edu
Wed Feb 27 19:52:35 EST 2013
On 2/27/13 7:36 PM, Cantor, Scott wrote:
> Is that a function of their code in some way, or is that always required
> of anything stored as a session attribute?
>
> I know containers can persist sessions, but I didn't think it was a
> requirement that they be able to do so in a given deployment.
No, you're correct I think, despite what I think some of the Webflow
docs have said. It's not strictly a requirement of HttpSession per the
spec, but rather a container choice as to how to handle, for example,
migrating sessions in a cluster. Tomcat also by default will serialize
sessions to disk on shutdown and reconstitute them again on startup.
I've personally had to deal with the latter before.
So technically you are correct, but I would still say that we can't
really stuff a huge non-serializable tree o'stuff into the session that
is going to be managed by unknown (to us) container strategies that
deployers might use. I think we'd get too many questions about it, for
example errors every time somebody restarted a Tomcat instance with
their default session manager.
> Anyway, obviously sounds like something we need to know. And if not, does
> it matter? Is it a problem to use our own context lookup code via a cookie
> that the actions just use?
Good question, hadn't really thought of that. I guess the idea of use
of conversation scope was to tie the lifetime of the state to the
lifecycle of the conversation. I suppose we could theoretically just
use our own storage indexed with a cookie, but then we'd be responsible
for managing its lifecycle, doing time expiration for cleanup, etc.
I'll think on it some more. Would almost certainly be just as easy
though, if not easier, to implement the Webflow interfaces, assuming it
works as expected.
More information about the dev
mailing list