tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1509156 - /tomcat/trunk/java/org/apache/catalina/realm/JDBCRealm.java
Date Thu, 01 Aug 2013 10:13:32 GMT
Author: markt
Date: Thu Aug  1 10:13:31 2013
New Revision: 1509156

URL: http://svn.apache.org/r1509156
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55333
Correct regression in fix for bug 55071.
Don't commit the connection until after the ResultSet has been used.

Modified:
    tomcat/trunk/java/org/apache/catalina/realm/JDBCRealm.java

Modified: tomcat/trunk/java/org/apache/catalina/realm/JDBCRealm.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/realm/JDBCRealm.java?rev=1509156&r1=1509155&r2=1509156&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/realm/JDBCRealm.java (original)
+++ tomcat/trunk/java/org/apache/catalina/realm/JDBCRealm.java Thu Aug  1 10:13:31 2013
@@ -534,12 +534,12 @@ public class JDBCRealm
 
                 stmt = credentials(dbConnection, username);
                 rs = stmt.executeQuery();
-                dbConnection.commit();
-
                 if (rs.next()) {
                     dbCredentials = rs.getString(1);
                 }
 
+                dbConnection.commit();
+
                 if (dbCredentials != null) {
                     dbCredentials = dbCredentials.trim();
                 }



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


Mime
View raw message