cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ralph Goers <>
Subject Re: Synchronization on session object (was svn commit: r169856 - /cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/environment/http/
Date Fri, 13 May 2005 13:27:39 GMT
Nathaniel Alfred wrote:

> 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 

>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.

View raw message