Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / examples / Simple / bank / server.cpp
blob17585f3e419e92c3686924d71289284fd7e8eb8b
1 #include "../Simple_util.h"
2 #include "AccountManager_i.h"
4 // This is the main driver program for the time and date server.
5 int
6 ACE_TMAIN(int argc, ACE_TCHAR *argv[])
8 Server<AccountManager_i> server;
10 ACE_DEBUG ((LM_DEBUG,
11 ACE_TEXT ("\n\tBank server\n\n")));
13 try
15 if (server.init ("Bank",
16 argc,
17 argv) == -1)
18 return 1;
19 else
21 server.run ();
24 catch (const CORBA::UserException& userex)
26 userex._tao_print_exception ("User Exception");
27 return -1;
29 catch (const CORBA::SystemException& sysex)
31 sysex._tao_print_exception ("System Exception");
32 return -1;
34 catch (const ::CORBA::Exception &e)
36 e._tao_print_exception ("CORBA exception");
37 return 1;
40 return 0;