tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Remy Maucherat <r...@apache.org>
Subject Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/realm JDBCRealm.java
Date Tue, 08 Mar 2005 23:46:43 GMT
Bill Barker wrote:
>>remm        2005/03/08 15:03:01
>>
>>  Modified:    catalina/src/share/org/apache/catalina/realm JDBCRealm.java
>>  Log:
>>  - Add back the reconnection logic to JDBC realm, which was removed for
> 
> wrong reasons. From what I saw, it causes major issues with MySQL otherwise
> 
>>    (obviously, another solution is to use the better data source realm).
> 
> <snip />
> 
>>  +                open();
>>  +
>>                   try {
>>  +                    stmt = credentials(dbConnection, username);
>>  +                    rs = stmt.executeQuery();
>>  +
>>  +                    if (rs.next()) {
>>  +                        dbCredentials = rs.getString(1);
>>  +                    }
>>                       rs.close();
> 
> 
> Either I'm really missing something, or you need a break statement here.
> Otherwise it always runs twice, even if the first time succeeded.

Thanks for reading the code, we need to catch regressions and problems 
more efficiently (we managed to caused major regressions in BOTH 
database realms in 5.5.7, which is completely unacceptable). In this 
case, there's a "return" inside the loop, so I assume it would be ok.

BTW, I did not test the code at all.

Rémy

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message