IFR_Server.cpp File Reference

#include "IFR_Service.h"
#include "tao/Environment.h"
#include "orbsvcs/Shutdown_Utilities.h"

Include dependency graph for IFR_Server.cpp:

Go to the source code of this file.

Classes

class  IFR_Service_Shutdown_Functor

Functions

int ACE_TMAIN (int argc, ACE_TCHAR *argv[])


Function Documentation

int ACE_TMAIN ( int  argc,
ACE_TCHAR argv[] 
)

Definition at line 37 of file IFR_Server.cpp.

References CORBA::Exception::_tao_print_exception(), IFR_Service::fini(), IFR_Service::init(), and IFR_Service::run().

00038 {
00039   IFR_Service server;
00040 
00041   IFR_Service_Shutdown_Functor killer (server);
00042   Service_Shutdown kill_contractor (killer);
00043 
00044   try
00045     {
00046       int status = server.init (argc, argv);
00047 
00048       if (status != 0)
00049         {
00050           return 1;
00051         }
00052       else
00053         {
00054           server.run ();
00055 
00056           status = server.fini ();
00057 
00058           if (status == -1)
00059             {
00060               return 1;
00061             }
00062         }
00063     }
00064   catch (const CORBA::SystemException& sysex)
00065     {
00066       sysex._tao_print_exception ("System Exception");
00067       return -1;
00068     }
00069   catch (const CORBA::Exception& ex)
00070     {
00071       ex._tao_print_exception ("Unknown Exception");
00072       return -1;
00073     }
00074   return 0;
00075 }


Generated on Tue Feb 2 17:50:51 2010 for TAO_IFR by  doxygen 1.4.7