From: jfa Date: Thu, 21 Feb 2008 07:48:27 +0000 (+0000) Subject: Fix from Christian CAREMOLI for distributed containers. X-Git-Tag: V4_1_1rc2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e76c9ecaee202fbf4eb8c249c181f0b8d9ed440c;p=modules%2Fgeom.git Fix from Christian CAREMOLI for distributed containers. --- diff --git a/src/GEOM_I_Superv/GEOM_Superv_i.cc b/src/GEOM_I_Superv/GEOM_Superv_i.cc index 731c0f77c..387c3b0d4 100644 --- a/src/GEOM_I_Superv/GEOM_Superv_i.cc +++ b/src/GEOM_I_Superv/GEOM_Superv_i.cc @@ -96,17 +96,15 @@ void GEOM_Superv_i::setGeomEngine() { if ( !CORBA::is_nil(myGeomEngine) ) return; - // get GEOM_Gen engine - ///* - SALOME_LifeCycleCORBA* lcc = new SALOME_LifeCycleCORBA( name_service ); - Engines::Component_var comp = lcc->FindOrLoad_Component( "FactoryServer", "GEOM" ); - //*/ - /* + // get GEOM_Gen engine Engines::Container_var cont=GetContainerRef(); - cont->load_component_Library("GEOM"); - Engines::Component_var comp=cont->create_component_instance("GEOM",0); - */ + CORBA::String_var container_name=cont->name(); + std::string shortName=container_name.in(); + shortName=shortName.substr(12); // substract "/Containers/" + SALOME_LifeCycleCORBA* lcc = new SALOME_LifeCycleCORBA( name_service ); + Engines::Component_var comp = lcc->FindOrLoad_Component( shortName.c_str(), "GEOM" ); + delete lcc; myGeomEngine = GEOM::GEOM_Gen::_narrow(comp); }