Improved Connection::transaction() method