Corrected use of setAutoCommit(), commit() and rollback().