2 // File: SALOME_RessourcesCatalog_Server.cxx
3 // Created: Mon Sep 10 2001
4 // Author: Estelle Deville
6 // Copyright : CEA/DEN/DMSS/LGLS
9 #include "SALOME_NamingService.hxx"
10 #include "SALOME_RessourcesCatalog_impl.hxx"
11 #include "utilities.h"
13 int main(int argc,char **argv)
16 CosNaming::NamingContext_var _rootContext, catalogContext;
20 CORBA::ORB_ptr orb = CORBA::ORB_init (argc, argv);
24 CORBA::Object_var poaobj = orb->resolve_initial_references ("RootPOA");
26 PortableServer::POA_var poa = PortableServer::POA::_narrow (poaobj);
27 PortableServer::POAManager_var mgr = poa->the_POAManager();
31 SALOME_RessourcesCatalogImpl* Catalogue_i = new SALOME_RessourcesCatalogImpl(argc, argv);
32 poa->activate_object (Catalogue_i);
37 CORBA::Object_ptr myCata = Catalogue_i->_this();
39 // initialise Naming Service
40 SALOME_NamingService *_NS;
41 _NS = new SALOME_NamingService(orb);
42 // register Catalog in Naming Service
43 _NS->Register(myCata ,"/Kernel/RessourcesCatalog");
45 MESSAGE("Running Ressources Catalog Server.")
52 catch(CORBA::SystemException&) {
53 INFOS("Caught CORBA::SystemException.")
55 catch(CORBA::Exception&) {
56 INFOS("Caught CORBA::Exception.")