00001
00002
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 "IFR_Service.cpp,v 1.22 2004/12/10 16:44:43 parsons Exp")
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 char *argv[]
00029 ACE_ENV_ARG_DECL)
00030 {
00031 int result;
00032 ACE_TRY
00033 {
00034 this->orb_ = CORBA::ORB_init (argc,
00035 argv,
00036 0
00037 ACE_ENV_ARG_PARAMETER);
00038 ACE_TRY_CHECK;
00039
00040 result = this->my_ifr_server_.init_with_orb (argc,
00041 argv,
00042 this->orb_.in ());
00043 if (result == -1)
00044 {
00045 return result;
00046 }
00047
00048 }
00049 ACE_CATCHANY
00050 {
00051 ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
00052 "IFR_Service::init");
00053
00054 ACE_RE_THROW;
00055 }
00056 ACE_ENDTRY;
00057 ACE_CHECK_RETURN (-1);
00058 return 0;
00059 }
00060
00061 int
00062 IFR_Service::run (ACE_ENV_SINGLE_ARG_DECL)
00063 {
00064 this->orb_->run (0 ACE_ENV_ARG_PARAMETER);
00065 ACE_CHECK_RETURN (-1);
00066
00067 return 0;
00068 }
00069
00070 int
00071 IFR_Service::fini (ACE_ENV_SINGLE_ARG_DECL)
00072 {
00073 ACE_TRY
00074 {
00075 this->my_ifr_server_.fini ();
00076 ACE_TRY_CHECK;
00077 }
00078 ACE_CATCHANY
00079 {
00080 ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
00081 "IFR_Service::fini");
00082 ACE_RE_THROW;
00083 }
00084 ACE_ENDTRY;
00085 ACE_CHECK_RETURN (-1);
00086 return 0;
00087 }
00088