public int defaultConnect(boolean exitOnError) {
    if (embeddedConnect() != ERRNO_OK && exitOnError) {
      return ERRNO_OTHER;
    }
    if (connectDBInEmbededMode() != ERRNO_OK && exitOnError) {
      return ERRNO_OTHER;
    }
    return ERRNO_OK;
  }
Start accepting input from stdin, and dispatch it
to the appropriate {@link CommandHandler} until the
global variable <code>exit</code> is true.
beeline/src/java/org/apache/hive/beeline/BeeLine.java