Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 83647 invoked from network); 29 Jul 2008 14:58:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Jul 2008 14:58:31 -0000 Received: (qmail 24792 invoked by uid 500); 29 Jul 2008 14:58:28 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 24440 invoked by uid 500); 29 Jul 2008 14:58:27 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 24429 invoked by uid 500); 29 Jul 2008 14:58:27 -0000 Delivered-To: apmail-jakarta-tomcat-dev@jakarta.apache.org Received: (qmail 24426 invoked by uid 99); 29 Jul 2008 14:58:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Jul 2008 07:58:27 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Jul 2008 14:57:41 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 3A92B238889B; Tue, 29 Jul 2008 07:58:07 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r680725 - /tomcat/trunk/java/org/apache/catalina/realm/JDBCRealm.java Date: Tue, 29 Jul 2008 14:58:06 -0000 To: tomcat-dev@jakarta.apache.org From: markt@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080729145807.3A92B238889B@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: markt Date: Tue Jul 29 07:58:05 2008 New Revision: 680725 URL: http://svn.apache.org/viewvc?rev=680725&view=rev Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=45453 Add yet more synchronisation to JDBCRealm. Based on a patch provided by Santtu Hyrkk. Modified: tomcat/trunk/java/org/apache/catalina/realm/JDBCRealm.java Modified: tomcat/trunk/java/org/apache/catalina/realm/JDBCRealm.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/realm/JDBCRealm.java?rev=680725&r1=680724&r2=680725&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/realm/JDBCRealm.java (original) +++ tomcat/trunk/java/org/apache/catalina/realm/JDBCRealm.java Tue Jul 29 07:58:05 2008 @@ -38,10 +38,11 @@ * See the JDBCRealm.howto for more details on how to set up the database and * for configuration options. * -*

TODO - Support connection pooling (including message -* format objects) so that authenticate(), -* getPassword() and authenticate() do not have to be -* synchronized and would fix the ugly connection logic.

+*

For a Realm implementation that supports connection pooling and +* doesn't require synchronisation of authenticate(), +* getPassword(), roles() and +* getPrincipal() or the ugly connection logic use the +* DataSourceRealm.

* * @author Craig R. McClanahan * @author Carson McDonald @@ -591,7 +592,7 @@ /** * Return the Principal associated with the given user name. */ - protected Principal getPrincipal(String username) { + protected synchronized Principal getPrincipal(String username) { return (new GenericPrincipal(this, username, --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org