refactoring Connection's transaction treatment