Add method for commit/rollback.