tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: svn commit: r1495155 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/realm/JDBCRealm.java webapps/docs/changelog.xml
Date Thu, 20 Jun 2013 20:51:35 GMT
2013/6/21  <markt@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.

"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)



>
> 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&apos;s credentials. (markt)
> +      </fix>
> +      <fix>
>          <bug>55073</bug>, <bug>55108</bug>, <bug>55109</bug>
&amp;
>          <bug>55110</bug>: Small performance improvements. Patches provided
by
>          Adrian Nistor. (markt)
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>

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


Mime
View raw message