--- apache-tomcat-5.5.26-src.orig/container/catalina/src/share/org/apache/catalina/realm/JDBCRealm.java 2008-01-28 22:42:59.000000000 +0200 +++ apache-tomcat-5.5.26-src.orig/container/catalina/src/share/org/apache/catalina/realm/JDBCRealm.java 2008-07-23 10:38:20.000000000 +0300 @@ -40,7 +40,8 @@ * *

TODO - Support connection pooling (including message * format objects) so that authenticate(), -* getPassword() and roles() 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,