cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <>
Subject Re: Synchronization on session object (was svn commit: r169856 - /cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/environment/http/
Date Mon, 23 May 2005 18:44:43 GMT
On 13.05.2005 11:37, Nathaniel Alfred wrote:

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

I think we don't get a final answer to whether synchronized(session) is 
supposed to work or not. Your main concern seems to be complex 
environments like clusters. But how is session.getId().intern() supposed 
to work? Have the cluster nodes running by different JVMs and it does 
neither work. Or am I wrong?


View raw message