summaryrefslogtreecommitdiff
path: root/ACE/TAO/orbsvcs/DevGuideExamples/NamingService/Naming_Server/NamingMessenger.cpp
blob: 35c41b37b589db0cfafe3b73f0607e6a55bba72a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// $Id$

#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;
}