Conrol how to commit transaction