--- apache-tomcat-6.0.16-src.orig/java/org/apache/catalina/realm/JDBCRealm.java 2008-01-29 00:41:08.000000000 +0200 +++ apache-tomcat-6.0.16-src.orig/java/org/apache/catalina/realm/JDBCRealm.java 2008-07-23 10:50:11.000000000 +0300 @@ -40,7 +40,8 @@ * *

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

* * @author Craig R. McClanahan @@ -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,