On 20/06/2013 21:51, Konstantin Kolinko wrote: > 2013/6/21 <ma...@apache.org>: >> Author: markt >> Date: Thu Jun 20 20:04:03 2013 >> New Revision: 1495155 >> >> URL: http://svn.apache.org/r1495155 >> Log: >> Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55071 >> Remove unnecessary call to commit(). The rs.close() just above will commit >> anything that needs to be committed. > > I think you are wrong here.
Quite possibly :) > "rs.close() will commit" happens only when autoCommit is set to true > (looking at java.sql.Connection javadoc linked in comment 2 of the > bugzilla issue). > > JDBCRealm runs with "setAutoCommit(false)" (around line 721 in its > open() method) I'll go and re-read the docs... Yep. I mis-read it. I'll fix that now. Mark >> Modified: >> tomcat/tc7.0.x/trunk/ (props changed) >> tomcat/tc7.0.x/trunk/java/org/apache/catalina/realm/JDBCRealm.java >> tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml >> >> Propchange: tomcat/tc7.0.x/trunk/ >> ------------------------------------------------------------------------------ >> Merged /tomcat/trunk:r1495154 >> >> Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/realm/JDBCRealm.java >> URL: >> http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/realm/JDBCRealm.java?rev=1495155&r1=1495154&r2=1495155&view=diff >> ============================================================================== >> --- tomcat/tc7.0.x/trunk/java/org/apache/catalina/realm/JDBCRealm.java >> (original) >> +++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/realm/JDBCRealm.java Thu >> Jun 20 20:04:03 2013 >> @@ -576,7 +576,6 @@ public class JDBCRealm >> >> containerLog.warn(sm.getString("jdbcRealm.abnormalCloseResultSet")); >> } >> } >> - dbConnection.commit(); >> } >> >> } catch (SQLException e) { >> >> Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml >> URL: >> http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1495155&r1=1495154&r2=1495155&view=diff >> ============================================================================== >> --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original) >> +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Thu Jun 20 20:04:03 2013 >> @@ -74,6 +74,10 @@ >> Web Start. Patch provided by Nick Williams. (markt) >> </fix> >> <fix> >> + <bug>55071</bug>: Ensure original exception is reported if JDBC >> Realm >> + fails to read a user's credentials. (markt) >> + </fix> >> + <fix> >> <bug>55073</bug>, <bug>55108</bug>, <bug>55109</bug> & >> <bug>55110</bug>: Small performance improvements. Patches provided >> by >> Adrian Nistor. (markt) >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: dev-h...@tomcat.apache.org >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org