00001 /* 00002 * 00003 * 00004 * Distributed under the OpenDDS License. 00005 * See: http://www.opendds.org/license.html 00006 */ 00007 00008 #include "DCPSInfoRepoServ.h" 00009 00010 #ifdef ACE_AS_STATIC_LIBS 00011 #include "dds/DCPS/InfoRepoDiscovery/InfoRepoDiscovery.h" 00012 #endif 00013 00014 #include <iostream> 00015 00016 int 00017 ACE_TMAIN(int argc, ACE_TCHAR *argv[]) 00018 { 00019 try { 00020 00021 InfoRepo infoRepo(argc, argv); 00022 00023 InfoRepo_Shutdown ir_shutdown(infoRepo); 00024 Service_Shutdown service_shutdown(ir_shutdown); 00025 00026 infoRepo.run(); 00027 00028 } catch (InfoRepo::InitError& ex) { 00029 std::cerr << "Unexpected initialization Error: " 00030 << ex.msg_ << std::endl; 00031 return -1; 00032 00033 } catch (const CORBA::Exception& ex) { 00034 ex._tao_print_exception("ERROR: DDS DCPS Info Repo caught exception"); 00035 return -1; 00036 } 00037 return 0; 00038 }