public static boolean isDatabaseException(Throwable ex) {
    do {
      if (ex instanceof DatabaseException) {
        return true;
      }
      ex = ex.getCause();

    } while (ex != null);

    return false;
  }
Provides utility methods to support operations retry
TODO injection as Guice singleon, static for now to avoid major modifications
ambari-server/src/main/java/org/apache/ambari/server/utils/RetryHelper.java