Int32 main(Int32 argc, char **argv)
{
  dovers(argc, argv);

  IdentifyMyself::SetMyName(I_AM_ESP);
  msg_debug_hook("arkesp", "esp.hook");

  try {
    file_init(&argc, &argv);
  }
  catch (SB_Fatal_Excep &e) {
    exit(1);
  }
  try {
    file_mon_process_startup(true);

    // setup log4cpp, need to be done here so initLog4cpp can have access to 
    // process information since it is needed to compose the log name
    // the log name for the ESP should be based on the master process information
    // since the master and all its subordinate processes log to the same
    // log4cpp file
    QRLogger::instance().setModule(QRLogger::QRL_ESP);
    QRLogger::instance().initLog4cpp("log4cpp.trafodion.masterexe.config");
  }
  catch (SB_Fatal_Excep &e) {
    SQLMXLoggingArea::logExecRtInfo(__FILE__, __LINE__, e.what(), 0);
    exit(1);
  }

  atexit(my_mpi_fclose);
  // Leave this commented out unless you need to debug the argument
  // cracking code below and can't rely on the -debug option.  This
  // allows the esp to put up a dialog box and then you can manually
  // force the esp into debug.
  if (getenv("SQL_MSGBOX_PROCESS") != NULL)
	 { MessageBox( NULL, "Server: Process Launched",
		       "tdm_arkesp", MB_OK|MB_ICONINFORMATION );};

  NABoolean fastStart = TRUE;
  Int32 currArg = 1;
  while (currArg < argc && fastStart == TRUE)
  {
    if (strcmp("-noespfaststart", argv[currArg]) == 0)
      fastStart = FALSE;
    currArg++;
  }
  short retCode;
  if (fastStart)
  {
    GuaReceiveFastStart *guaReceiveFastStart = new GuaReceiveFastStart();
    retCode = runESP(argc,argv,guaReceiveFastStart);
  }
  else
    retCode = runESP(argc,argv);
  ENDTRANSACTION();

  return retCode;

}
Int32 main(Int32 argc, char **argv)
{
  dovers(argc, argv);

  IdentifyMyself::SetMyName(I_AM_ESP);
  msg_debug_hook("arkesp", "esp.hook");

  try {
    file_init(&argc, &argv);
  }
  catch (SB_Fatal_Excep &e) {
    exit(1);
  }
  try {
    file_mon_process_startup(true);

    // Initialize log4cxx 
    QRLogger::initLog4cxx(QRLogger::QRL_ESP);
  }
  catch (SB_Fatal_Excep &e) {
    SQLMXLoggingArea::logExecRtInfo(__FILE__, __LINE__, e.what(), 0);
    exit(1);
  }

  atexit(my_mpi_fclose);
  // Leave this commented out unless you need to debug the argument
  // cracking code below and can't rely on the -debug option.  This
  // allows the esp to put up a dialog box and then you can manually
  // force the esp into debug.
  if (getenv("SQL_MSGBOX_PROCESS") != NULL)
	 { MessageBox( NULL, "Server: Process Launched",
		       "tdm_arkesp", MB_OK|MB_ICONINFORMATION );};

  NABoolean fastStart = TRUE;
  Int32 currArg = 1;
  while (currArg < argc && fastStart == TRUE)
  {
    if (strcmp("-noespfaststart", argv[currArg]) == 0)
      fastStart = FALSE;
    currArg++;
  }
  short retCode;
  if (fastStart)
  {
    GuaReceiveFastStart *guaReceiveFastStart = new GuaReceiveFastStart();
    retCode = runESP(argc,argv,guaReceiveFastStart);
  }
  else
    retCode = runESP(argc,argv);
  ENDTRANSACTION();

  return retCode;

}