cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <>
Subject Re: svn commit: r169856 - /cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/environment/http/
Date Fri, 13 May 2005 07:53:17 GMT
Ralph Goers <Ralph.Goers <at>> writes:

> Why is "sessions" a synchronized map if you are only accessing it in a 
> block synchronized on the session.  I would much prefer that you
> a) not use a synchronized map
> b) synchronize on the map instead of the session.
> Is there a reason that this wouldn't work?

It would work, but IMO the current implementation is better because it is more
fine-grained. Synchronizing the block on the map (yes, you don't need a
synchronized map then) blocks all requests for the execution of this block while
this impl blocks only the requests for the current server session. Only the
access to the map itself must be blocked for all requests.


View raw message