I get a connection from c3p0 pool for batch insert and i set the autoCommit=false,after using,i put it back to the poll. If the autoCommit=false still valid for this connection?
manual set the properties of connection manager by c3p0
420 views Asked by lolita At
1
No. According the the JDBC spec, new Connections are autocommit=true, and c3p0 implements transparent Connection pooling, meaning an application that functions correctly in a c3p0 application should also function correctly using an unpooled Connection source.
If you wish, you can override this behavior by defining a ConnectionCustomizer. Something like...
Then, in your config...
I hope this helps!