Hi.
I am useing Jdbc3PoolingDataSource to do database pooling. When I first
started using it some of my updates where not taking effect. So I
started enabled postgres logging and watched my queries, and I found out
why. The Jdbc3PoolingDataSource by default sets setDefaultAutoCommit to
false, and because of that, after every query it was calling "rollback".
To fix it, I extended Jdbc3PoolingDataSource, over-wrote the
createConnectionPool like so:
protected ConnectionPool createConnectionPool() {
ConnectionPool pool = super.createConnectionPool();
pool.setDefaultAutoCommit(true);
return pool;
}
So my question is, how should I have worked with defaultAutoCommit set
to true? Would I need to wrap all of my queries in begin; and commit; ?
Thanks