Hi all,
I can't understand why in org.apache.commons.dbcp.PoolableConnectionFactory in the passivateObject method autocommit is set true:

lines 688-680 (dbcp 14)
         if(!conn.getAutoCommit()) {
                conn.setAutoCommit(true);
            }

If defaultAutoCommit is set to false the query "SET autocommit=1" should be executed for each getConnection() call.
This is the all queries log result:

*         12 Query    SET autocommit=1
           12 Query    SET autocommit=0
* 12 Query select chiave,email,password,status,props,syncro,tipoUtente,sito,newprops from utenti where sito='fie' and (tipoUtente='SCUOLASCI' and status=2)
           12 Query    rollback
*           12 Query    SET autocommit=1
           12 Query    SET autocommit=0
* 12 Query select chiave,email,password,status,props,syncro,tipoUtente,sito,newprops from utenti where sito='fie' and (tipoUtente='BIKERENTAL' and status=2)
           12 Query    rollback
*           12 Query    SET autocommit=1
           12 Query    SET autocommit=0
* 12 Query select chiave,email,password,status,props,syncro,tipoUtente,sito,newprops from utenti where sito='fie' and (tipoUtente='RIFUGIO' and status=2)
           12 Query    rollback
*          12 Query    SET autocommit=1
           12 Query    SET autocommit=0
* 12 Query select chiave,email,password,status,props,syncro,tipoUtente,sito,newprops from utenti where sito='fie' and (tipoUtente='SKIRENTAL' and status=2)
           12 Query    rollback
           12 Query    SET autocommit=1

thank you in advance for any suggestion.
Andrea


Reply via email to