Author: markt Date: Wed Aug 13 15:04:52 2008 New Revision: 685696 URL: http://svn.apache.org/viewvc?rev=685696&view=rev Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=45453 Additional syncs required. Based on a patch provided by Santtu Hyrkk.
Modified: tomcat/tc6.0.x/trunk/STATUS.txt tomcat/tc6.0.x/trunk/java/org/apache/catalina/realm/JDBCRealm.java tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Modified: tomcat/tc6.0.x/trunk/STATUS.txt URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=685696&r1=685695&r2=685696&view=diff ============================================================================== --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Aug 13 15:04:52 2008 @@ -64,13 +64,6 @@ -1: remm (this error seems to be displayed by Class.newInstance() which should be ok to use; I am not ok with the idea of working around every error message from JDKs) -* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=45453 - Add required sync to race condition - Based on a patch by Santtu Hyrkk - http://svn.apache.org/viewvc?rev=680725&view=rev - +1: markt, remm, funkman - -1: - * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=45511 Revert fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=42565 and implement alternative Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/realm/JDBCRealm.java URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/realm/JDBCRealm.java?rev=685696&r1=685695&r2=685696&view=diff ============================================================================== --- tomcat/tc6.0.x/trunk/java/org/apache/catalina/realm/JDBCRealm.java (original) +++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/realm/JDBCRealm.java Wed Aug 13 15:04:52 2008 @@ -38,10 +38,11 @@ * See the JDBCRealm.howto for more details on how to set up the database and * for configuration options. * -* <p><strong>TODO</strong> - Support connection pooling (including message -* format objects) so that <code>authenticate()</code>, -* <code>getPassword()</code> and <code>authenticate()</code> do not have to be -* synchronized and would fix the ugly connection logic. </p> +* <p>For a <b>Realm</b> implementation that supports connection pooling and +* doesn't require synchronisation of <code>authenticate()</code>, +* <code>getPassword()</code>, <code>roles()</code> and +* <code>getPrincipal()</code> or the ugly connection logic use the +* <code>DataSourceRealm</code>.</p> * * @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, Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=685696&r1=685695&r2=685696&view=diff ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Wed Aug 13 15:04:52 2008 @@ -32,6 +32,16 @@ </properties> <body> +<section name="Tomcat 6.0.19 (remm)"> + <subsection name="Cataina"> + <changelog> + <fix> + <bug>45453</bug>: Remove potential race condition in JDBC Realm. + Based on a patch by Santtu Hyrkk. (markt) + </fix> + </changelog> + </subsection> +</section> <section name="Tomcat 6.0.18 (remm)"> <subsection name="Cataina"> <changelog> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]