@contextlib.contextmanager<EOL><INDENT>def __call__(self, name=None):<DEDENT>
conn = self.connection(name)<EOL>try:<EOL><INDENT>yield conn<EOL><DEDENT>finally:<EOL><INDENT>self.close_connection(conn)<EOL><DEDENT>
returns a database connection wrapped in a contextmanager.

        The context manager will assure that the connection is closed but will
        not try to commit or rollback lingering transactions.

        parameters:
            name - an optional name for the database connection