Merge pull request #1551 from DOCGroup/plm_jira_333
[ACE_TAO.git] / TAO / examples / Persistent_Grid / server.cpp
blob5511f3154e956ed7c7fa89c195fd8e06d1b45dd6
1 #include "Simple_util.h"
2 #include "Grid_i.h"
4 // This is the main driver program for the time and date server.
6 int
7 ACE_TMAIN(int argc, ACE_TCHAR *argv[])
9 Server<Grid_Factory_i> server;
11 ACE_DEBUG ((LM_DEBUG,
12 "\n\tGrid server\n\n"));
15 try
17 if (server.init ("Grid",
18 argc,
19 argv) == -1)
20 return 1;
21 else
23 server.run ();
26 catch (const CORBA::UserException& userex)
28 userex._tao_print_exception ("User Exception");
29 return -1;
31 catch (const CORBA::SystemException& sysex)
33 sysex._tao_print_exception ("System Exception");
34 return -1;
37 return 0;