Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 95301 invoked from network); 13 May 2005 08:02:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 13 May 2005 08:02:17 -0000 Received: (qmail 56978 invoked by uid 500); 13 May 2005 08:06:24 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 56917 invoked by uid 500); 13 May 2005 08:06:24 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@cocoon.apache.org List-Id: Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 56904 invoked by uid 99); 13 May 2005 08:06:24 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of ap-cocoon-dev@m.gmane.org designates 80.91.229.2 as permitted sender) Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by apache.org (qpsmtpd/0.28) with ESMTP; Fri, 13 May 2005 01:06:23 -0700 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1DWUzN-0006MU-TN for dev@cocoon.apache.org; Fri, 13 May 2005 09:53:41 +0200 Received: from srvgw12.rauser-ag.com ([217.146.133.165]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 13 May 2005 09:53:41 +0200 Received: from joerg.heinicke by srvgw12.rauser-ag.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 13 May 2005 09:53:41 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: dev@cocoon.apache.org From: Joerg Heinicke Subject: Re: svn commit: r169856 - =?utf-8?b?L2NvY29vbi9icmFuY2hlcy9CUkFOQ0hfMl8xX1gvc3JjL2phdmEvb3JnL2FwYWNoZS9jb2Nvb24vZW52aXJvbm1lbnQvaHR0cC9IdHRwUmVxdWVzdC5qYXZh?= Date: Fri, 13 May 2005 07:53:17 +0000 (UTC) Lines: 16 Message-ID: References: <20050512175021.72036.qmail@minotaur.apache.org> <4283EBCB.4040101@dslextreme.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: main.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 217.146.133.165 (Mozilla/5.0 (Windows; U; Windows NT 5.0; de-DE; rv:1.7.7) Gecko/20050414 Firefox/1.0.3) Sender: news X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Ralph Goers dslextreme.com> 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. Joerg