Salome HOME
bos #26523 EDF 24234 - Viscous Layer
[modules/smesh.git] / src / SMESH_I / SMESH_Component_Generator.cxx
index a1819c5e1be469223061c286349c96e472d74352..0a1a1d9c210b6b6f781a202d0e22512cb4bec7f5 100644 (file)
@@ -23,6 +23,8 @@
 #include "SALOME_Container_i.hxx"
 #include "SALOME_KernelServices.hxx"
 
+#include "SALOME_Fake_NamingService.hxx"
+
 #include <cstring>
 
 static Engines::EngineComponent_var _unique_compo;
@@ -41,11 +43,13 @@ Engines::EngineComponent_var RetrieveSMESHInstance()
     PortableServer::POAManager_var pman = poa->the_POAManager();
     CORBA::PolicyList policies;
     policies.length(0);
-    Engines_Container_i *cont(KERNEL::getContainerSA());
+    auto *cont(KERNEL::getContainerSA());
     PortableServer::ObjectId *conId(cont->getCORBAId());
     //
     pman->activate();
     //
+    SMESH_Gen_i::SetNS(new SALOME_Fake_NamingService);
+    //
     SMESH_Gen_No_Session_i *servant = new SMESH_Gen_No_Session_i(orb, poa, conId, "SMESH_inst_2", "SMESH");
     PortableServer::ObjectId *zeId = servant->getId();
     CORBA::Object_var zeRef = poa->id_to_reference(*zeId);