Bloomberg LP Interview Question
cn.aetAutoCommit(false) allows to group multiple subsequent statements under the same transaction. The transaction will be committed when cn.commit(); is invoked. Changing the auto-commit mode through connection.setAutoCommit() will implicitly commit the active transaction and create a new one.
However, only calling connection.setAutoCommit(false); doesn't creates a transaction. It only means that any statement created using this connection will be committed together when you call connection.commit();.
cn.flush()
- Neeraj Asrani July 27, 2011