summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/Time_Service/Time_Service_Server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/Time_Service/Time_Service_Server.cpp')
-rw-r--r--TAO/orbsvcs/Time_Service/Time_Service_Server.cpp41
1 files changed, 41 insertions, 0 deletions
diff --git a/TAO/orbsvcs/Time_Service/Time_Service_Server.cpp b/TAO/orbsvcs/Time_Service/Time_Service_Server.cpp
new file mode 100644
index 00000000000..4b2714a3c24
--- /dev/null
+++ b/TAO/orbsvcs/Time_Service/Time_Service_Server.cpp
@@ -0,0 +1,41 @@
+// $Id$
+
+#include "Server_i.h"
+#include "ace/OS_main.h"
+
+ACE_RCSID(TimeService, Time_Service_Server, "$Id$")
+
+// This is the main driver program for the Time Service server.
+
+int
+ACE_TMAIN (int argc, ACE_TCHAR* argv[])
+{
+ Server_i server;
+
+ ACE_DEBUG ((LM_DEBUG,
+ "[SERVER] Process/Thread Id : (%P/%t) Time Service server\n"));
+
+ try
+ {
+ int r = server.init (argc, argv);
+
+ if (r == -1)
+ return 1;
+ else
+ {
+ server.run ();
+ }
+ }
+ catch (const CORBA::SystemException& sysex)
+ {
+ sysex._tao_print_exception ("System Exception");
+ return -1;
+ }
+ catch (const CORBA::UserException& userex)
+ {
+ userex._tao_print_exception ("User Exception");
+ return -1;
+ }
+
+ return 0;
+}