Merge pull request #2301 from sonndinh/remove-dup-reactor-functions
[ACE_TAO.git] / TAO / orbsvcs / IFR_Service / IFR_Service.cpp
blob52cee031222c1a3afd45a6f695febbb31e3e65a0
1 /* -*- C++ -*- */
2 #include "IFR_Service.h"
3 #include "orbsvcs/IFRService/ComponentRepository_i.h"
4 #include "orbsvcs/IFRService/Options.h"
5 #include "tao/IFR_Client/IFR_ComponentsS.h"
6 #include "orbsvcs/IFRService/IFR_Service_Utils.h"
7 #include "orbsvcs/IOR_Multicast.h"
8 #include "tao/IORTable/IORTable.h"
9 #include "tao/ORB_Core.h"
10 #include <memory>
12 IFR_Service::IFR_Service ()
16 IFR_Service::~IFR_Service ()
20 int
21 IFR_Service::init (int argc,
22 ACE_TCHAR *argv[])
24 int result;
25 try
27 this->orb_ = CORBA::ORB_init (argc, argv);
29 result = this->my_ifr_server_.init_with_orb (argc,
30 argv,
31 this->orb_.in ());
32 if (result != 0)
34 return result;
38 catch (const CORBA::Exception& ex)
40 ex._tao_print_exception ("IFR_Service::init");
42 throw;
44 return 0;
47 int
48 IFR_Service::run ()
50 this->orb_->run (0);
52 return 0;
55 int
56 IFR_Service::fini ()
58 try
60 this->my_ifr_server_.fini ();
62 catch (const CORBA::Exception& ex)
64 ex._tao_print_exception ("IFR_Service::fini");
65 throw;
67 return 0;
70 void
71 IFR_Service::shutdown ()
73 this->orb_->shutdown ();