Open the connection to the database based on the configuration file.

def _open_connection(self):
        """
        Open the connection to the database based on the configuration file.
        """
        if self._connection:
            try:
                self._connection.close()
            except Exception:
                pass

        db = self._get_db()
        self._connection = db.open()

        self._connection.onCloseCallback(self._on_close_callback)