You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2008/08/14 11:37:25 UTC
svn commit: r685835 - in /tomcat:
container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/JDBCRealm.java
container/tc5.5.x/webapps/docs/changelog.xml current/tc5.5.x/STATUS.txt
Author: markt
Date: Thu Aug 14 02:37:23 2008
New Revision: 685835
URL: http://svn.apache.org/viewvc?rev=685835&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=45453
Add required sync to race condition
Based on a patch by Santtu Hyrkk
Modified:
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/JDBCRealm.java
tomcat/container/tc5.5.x/webapps/docs/changelog.xml
tomcat/current/tc5.5.x/STATUS.txt
Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/JDBCRealm.java
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/JDBCRealm.java?rev=685835&r1=685834&r2=685835&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/JDBCRealm.java (original)
+++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/JDBCRealm.java Thu Aug 14 02:37:23 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>roles()</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/container/tc5.5.x/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?rev=685835&r1=685834&r2=685835&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original)
+++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Thu Aug 14 02:37:23 2008
@@ -101,6 +101,10 @@
<bug>45293</bug>: Update name of commons-logging jar in security policy.
(markt)
</fix>
+ <fix>
+ <bug>45453</bug>: Fix race condition in JDBC Realm. Based on a patch
+ provided by Santtu Hyrkk. (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Connectors">
Modified: tomcat/current/tc5.5.x/STATUS.txt
URL: http://svn.apache.org/viewvc/tomcat/current/tc5.5.x/STATUS.txt?rev=685835&r1=685834&r2=685835&view=diff
==============================================================================
--- tomcat/current/tc5.5.x/STATUS.txt (original)
+++ tomcat/current/tc5.5.x/STATUS.txt Thu Aug 14 02:37:23 2008
@@ -49,13 +49,6 @@
+1: markt, yoavs, fhanik
-1:
-* 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, yoavs, fhanik
- -1:
-
* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=45591
NPE on start-up failure in some cases. Based on a patch by Matt Passell
http://svn.apache.org/viewvc?rev=683982&view=rev
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org