// $Id: NamingMessenger.cpp 83415 2008-10-23 08:18:15Z johnnyw $

#include "NamingTask.h"
#include "MessengerTask.h"
#include "ace/OS.h"

int ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
  // Start the Naming Service task
  NamingTask namingService(argc, argv);
  namingService.activate();
  // Wait for the Naming Service initialized.
  namingService.waitInit();

  // Start the Messenger task
  MessengerTask messenger;
  messenger.activate();

  // Wait the Messenger task finish.
  messenger.wait();
  // Shutdown the Naming Service.
  namingService.end();

  return 0;
}
