On 2/2/07, Al Maw <[EMAIL PROTECTED]> wrote:
Hi,

There's code in SecondLevelCacheSessionStore.SecondLevelCachePageMap
which checks if a page is stateless when it is put() and doesn't bother
calling dirty() if so.

However, dirty() is always called from various constructors (for example
the Session constructor calls setLocale() which calls dirty()).

This doesn't seem right.

Yeah, I'll change that to set the locale directly.

Should stateless pages never have dirty() sessions?
If that's the case, should we fix these and have a call to
Session.dirty() trigger a bind()?

I don't know about that. Dirty doesn't do a whole lot currently; it
triggers setAttribute with this (the session), and that checks whether
a session should be created in case there wasn't one, but if the
session id is still null, nothing will happen. It seems to work fine
so far, or do you have specific problems?

If we were to trigger a bind on dirty, we should at least remove some
finals on methods like getStyle, so that you can have a session
specific style without triggering session binding.

Or... ?

I've just fixed Session.bind() so it actually persists the session,
which it didn't before (this normally doesn't matter, but causes oddness
if you redirect from a stateless page to a stateful one, expecting
bind() on the stateless page to propagate the session to the stateful
redirect page like the javadoc says it will).

Good catch.

Eelco

Reply via email to