code: public static boolean isH2Connection(Settings configuration) {
          final String connStr;
          try {
              connStr = configuration.getConnectionString(
                      Settings.KEYS.DB_CONNECTION_STRING,
                      Settings.KEYS.DB_FILE_NAME);
          } catch (IOException ex) {
              LOGGER.debug("Unable to get connectionn string", ex);
              return false;
          }
          return connStr.startsWith("jdbc:h2:file:");
      }
docs: Determines if the connection string is for an H2 database.
  
  @param configuration the configured settings
  @return true if the connection string is for an H2 database