Hi all!

If somebody is interested in solution for BUG #21190 (recently submited by me -
"JDBCRealm is trying to use closed connections without checking" in tomcat
4.0.6, http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21190) please see the
file attached. BTW this bug also seems to be actual for the last (4.1.24)
version of tomcat too.

Best regards, Alexey
--- JDBCRealm.java.orig Tue Oct  8 18:16:42 2002
+++ JDBCRealm.java      Mon Jun 30 18:42:21 2003
@@ -526,8 +526,12 @@
     protected Connection open() throws SQLException {
 
         // Do nothing if there is a database connection already open
-        if (dbConnection != null)
+        if (dbConnection != null && !dbConnection.isClosed())
             return (dbConnection);
+
+        // Need to recompile all prepared statements
+        this.preparedCredentials = null;
+        this.preparedRoles = null;
 
         // Instantiate our database driver if necessary
         if (driver == null) {

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to