commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Steitz (JIRA)" <>
Subject [jira] Commented: (DBCP-286) DBCP does not rollback
Date Sun, 05 Apr 2009 15:48:12 GMT


Phil Steitz commented on DBCP-286:

What jdbc driver are you using (i.e., what database and driver version?)

Where exactly are you setting automcommit on the connection?  I assume this is on the connection
returned by the pool, not defaultAutoCommit, right?

Both 1.2.1 and 1.2.2 do the following when returning connections to the pool (PoolableConnectionFactory#passivate):

   if(!conn.getAutoCommit() && !conn.isReadOnly()) {

 Both set autoCommit to true (independent of defaultAutocommit setting) after this, but 1.2.2
tests the value first

    if(!conn.getAutoCommit()) {

1.2.1 always executes conn.setAutoCommit(true) without testing the value.
Before giving a connection to a client (PoolableConnectionFactory#activate), 1.2.1 sets all
values to the default settings directly, but 1.2.2 tests the values first, invoking setters
only if getters return values different from the defaults.  These changes were to address

> DBCP does not rollback
> ----------------------
>                 Key: DBCP-286
>                 URL:
>             Project: Commons Dbcp
>          Issue Type: Bug
>    Affects Versions: 1.2.2
>         Environment: maven, gentoo linux, any java version
>            Reporter: Trenton D. Adams
>            Priority: Blocker
>             Fix For: 1.3
>   Original Estimate: 1h
>  Remaining Estimate: 1h
> DBCP 1.2.2 does not do connection rollbacks.  Or, at least the one in maven 2 repositories
does not.  I switched back to 1.2.1, and it works great.
> I asked about this back in 2005, and it was stated that it did.  And, it does, up until

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message