1 #include "AMH_Servant.h"
2 #include "Base_Server.h"
5 usage (const char *message
)
7 // @@ Mayur, what use is there in placing a space before a newline
10 // Mayur: It makes the newline stand out
12 static const char * usage
=
13 "invoke as: st_server -o <ior_output_file>\n"
14 "-s <sleep_time (in microseconds)>\n";
16 ACE_ERROR ((LM_ERROR
, "%s : %s", message
, usage
));
20 ACE_TMAIN(int argc
, ACE_TCHAR
*argv
[])
22 Base_Server
amh_server (argc
, argv
);
23 amh_server
.try_RT_scheduling();
24 amh_server
.start_orb_and_poa ();
26 if (amh_server
.parse_args () != 1)
28 usage ("IOR file missing\n");
32 AMH_Servant
servant (amh_server
.orb ());
34 if (servant
.parse_args (argc
, argv
) != 1)
36 usage ("Sleep time unspecified\n");
40 amh_server
.register_servant (&servant
);
41 amh_server
.run_event_loop ();
42 amh_server
.shutdown_orb_and_poa ();