Refactore Transaction to add close and autocommit

review2151002