Nathaniel Alfred wrote:
<snip>
Bottomline:
I think synchronized(session) should never be used as vehicle to
coordinate concurrent requests because there is no convincing guarantee
that it is always working as expected.
Thanks for doing more research. Although you put it much more clearly
than me, this is exactly the statement I was trying to make, but not as
well.
Joerg, if you want to do it in your usercode, I don't mind, but please
don't use it in common Cocoon code. My propesed alternative of
synchronized(session.getId().intern()) may look obscure but at least
it is guaranteed to work.
In my interpretation the old getSession version was already compliant to
Servlet specs. Whether to keep the new version I am +0. It avoids a
programming error to manifest in simple environments but in complex
setups it just may shift the error rate from 1/thousand to 1/million -
and this is really one of the worst situations.
But maybe I am just paranoid?
That is not necessarily a bad thing.
Anybody who knows an authoritative statement on the isolation level
for session attributes?
Cheers, Alfred.