Merge pull request #1551 from DOCGroup/plm_jira_333
[ACE_TAO.git] / TAO / examples / AMH / Sink_Server / mt_server.cpp
blob151db89c651669359a62d270137cc7167cf8e033
1 #include "MT_AMH_Server.h"
2 #include "AMH_Servant.h"
4 int
5 ACE_TMAIN(int argc, ACE_TCHAR *argv[])
7 MT_AMH_Server amh_server (argc, argv);
8 amh_server.try_RT_scheduling();
9 amh_server.start_orb_and_poa ();
11 if (amh_server.parse_args () != 1)
13 amh_server.usage ("");
14 ACE_OS::exit (1);
17 AMH_Servant servant (amh_server.orb ());
19 if (servant.parse_args (argc, argv) != 1)
21 amh_server.usage ("sleep time unspecified");
22 ACE_OS::exit (1);
25 amh_server.register_servant (&servant);
26 amh_server.start_threads ();
27 amh_server.shutdown_orb_and_poa ();
29 return 1;