public QueryManager getQueryManager() {
    if (qm == null) {
      synchronized (this) {
        if (qm == null) {
          try {
            String pluginClass =
                CommonProperties.getInstance().getProperty(QUERY_MANAGER_CLASS_PROPERTY);

            qm = (QueryManager) createPluginInstance(pluginClass);
          } catch (Exception e) {
            String errmsg =
                "[QueryManager] Cannot instantiate "
                    + "QueryManager plugin. Please check that "
                    + "property '"
                    + QUERY_MANAGER_CLASS_PROPERTY
                    + "' is correctly set in omar-common.properties file.";
            log.error(errmsg, e);
          }
        }
      }
    }

    return qm;
  }