Add setAutoCommit(true) before close.