Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 47153 invoked from network); 20 Dec 2006 15:05:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Dec 2006 15:05:46 -0000 Received: (qmail 54847 invoked by uid 500); 20 Dec 2006 15:05:53 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 54819 invoked by uid 500); 20 Dec 2006 15:05:52 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 54810 invoked by uid 99); 20 Dec 2006 15:05:52 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Dec 2006 07:05:52 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Dec 2006 07:05:44 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 606E27142A1 for ; Wed, 20 Dec 2006 07:05:24 -0800 (PST) Message-ID: <16927315.1166627124392.JavaMail.jira@brutus> Date: Wed, 20 Dec 2006 07:05:24 -0800 (PST) From: "Stefan Guggisberg (JIRA)" To: dev@jackrabbit.apache.org Subject: [jira] Commented: (JCR-685) Remove some synchronization on CachingNamespaceResolver In-Reply-To: <3386506.1166518821094.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ http://issues.apache.org/jira/browse/JCR-685?page=comments#action_12459960 ] Stefan Guggisberg commented on JCR-685: --------------------------------------- > How about this one? +1 > Remove some synchronization on CachingNamespaceResolver > ------------------------------------------------------- > > Key: JCR-685 > URL: http://issues.apache.org/jira/browse/JCR-685 > Project: Jackrabbit > Issue Type: Improvement > Components: core > Affects Versions: 1.1, 1.1.1 > Reporter: Marcel Reutegger > Priority: Minor > Fix For: 1.2 > > Attachments: CachingNamespaceResolver.patch > > > The methods getQName() and getJCRName() are unnecessarily synchronized and cause monitor contention with concurrent calls to the methods of the NameCache interface (those are also synchronized). > I propose the following change: > Index: CachingNamespaceResolver.java > =================================================================== > --- CachingNamespaceResolver.java (revision 488245) > +++ CachingNamespaceResolver.java (working copy) > @@ -84,7 +84,7 @@ > /** > * @deprecated use {@link NameFormat#parse(String, NamespaceResolver)} > */ > - public synchronized QName getQName(String name) > + public QName getQName(String name) > throws IllegalNameException, UnknownPrefixException { > return NameFormat.parse(name, this); > } > @@ -92,7 +92,7 @@ > /** > * @deprecated use {@link NameFormat#format(QName, NamespaceResolver)} > */ > - public synchronized String getJCRName(QName name) > + public String getJCRName(QName name) > throws NoPrefixDeclaredException { > return NameFormat.format(name, this); > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira