00001 /* -*- C++ -*- */ 00002 // $Id: IFR_Service.cpp 82869 2008-09-29 08:02:27Z johnnyw $ 00003 00004 #include "IFR_Service.h" 00005 #include "orbsvcs/IFRService/ComponentRepository_i.h" 00006 #include "orbsvcs/IFRService/Options.h" 00007 #include "orbsvcs/IFRService/IFR_ComponentsS.h" 00008 #include "orbsvcs/IFRService/IFR_Service_Utils.h" 00009 #include "orbsvcs/IOR_Multicast.h" 00010 #include "tao/IORTable/IORTable.h" 00011 #include "tao/ORB_Core.h" 00012 #include "ace/Auto_Ptr.h" 00013 00014 ACE_RCSID (IFR_Service, 00015 IFR_Service, 00016 "$Id: IFR_Service.cpp 82869 2008-09-29 08:02:27Z johnnyw $") 00017 00018 IFR_Service::IFR_Service (void) 00019 { 00020 } 00021 00022 IFR_Service::~IFR_Service (void) 00023 { 00024 } 00025 00026 int 00027 IFR_Service::init (int argc, 00028 ACE_TCHAR *argv[]) 00029 { 00030 int result; 00031 try 00032 { 00033 this->orb_ = CORBA::ORB_init (argc, argv); 00034 00035 result = this->my_ifr_server_.init_with_orb (argc, 00036 argv, 00037 this->orb_.in ()); 00038 if (result != 0) 00039 { 00040 return result; 00041 } 00042 00043 } 00044 catch (const CORBA::Exception& ex) 00045 { 00046 ex._tao_print_exception ("IFR_Service::init"); 00047 00048 throw; 00049 } 00050 return 0; 00051 } 00052 00053 int 00054 IFR_Service::run (void) 00055 { 00056 this->orb_->run (0); 00057 00058 return 0; 00059 } 00060 00061 int 00062 IFR_Service::fini (void) 00063 { 00064 try 00065 { 00066 this->my_ifr_server_.fini (); 00067 } 00068 catch (const CORBA::Exception& ex) 00069 { 00070 ex._tao_print_exception ("IFR_Service::fini"); 00071 throw; 00072 } 00073 return 0; 00074 } 00075 00076 void 00077 IFR_Service::shutdown (void) 00078 { 00079 this->orb_->shutdown (); 00080 }