commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrea Sodomaco <and...@sodomaco.it>
Subject DBCP 1.4 autocommit
Date Wed, 28 Sep 2011 15:24:53 GMT
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



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message