Salome HOME
AutoGIL.hxx has been factorized to KERNEL PythonCppUtils.hxx
[modules/yacs.git] / src / genericgui / GuiExecutor.cxx
index c758989b8b68254b583aa9556b362b8c8a8096ee..451ba40ca17cb1b5a603a1c6bff3272591413527 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2006-2016  CEA/DEN, EDF R&D
+// Copyright (C) 2006-2021  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -19,7 +19,8 @@
 
 #include <Python.h>
 #include "SALOME_LifeCycleCORBA.hxx"
-#include "SALOME_NamingService.hxx"
+#include "SALOME_NamingService_Wrapper.hxx"
+#include "SALOME_Launcher.hxx"
 
 #include "GuiExecutor.hxx"
 #include "GuiObserver_i.hxx"
@@ -33,6 +34,7 @@
 #include "OutputPort.hxx"
 #include "Executor.hxx"
 
+#include "KernelBasis.hxx"
 
 //#define _DEVDEBUG_
 #include "YacsTrace.hxx"
@@ -62,6 +64,10 @@ GuiExecutor::GuiExecutor(YACS::ENGINE::Proc* proc)
 
   _loadStateFile = "";
   _breakpointList.clear();
+  if(getSSLMode())
+  {
+    KERNEL::getLauncherSA();
+  }
 }
 
 
@@ -89,13 +95,16 @@ void GuiExecutor::startResumeDataflow(bool initialize)
       DEBTRACE("Create YACS ORB engine!");
       YACS::ENGINE::RuntimeSALOME* runTime = YACS::ENGINE::getSALOMERuntime();
       CORBA::ORB_ptr orb = runTime->getOrb();
-      SALOME_NamingService namingService(orb);
-      SALOME_LifeCycleCORBA lcc(&namingService);
-      ostringstream containerName;
-      containerName << "localhost/YACSContainer";
-      Engines::EngineComponent_var comp = lcc.FindOrLoad_Component(containerName.str().c_str(), "YACS" );
-      _engineRef =YACS_ORB::YACS_Gen::_narrow(comp);
-      YASSERT(!CORBA::is_nil(_engineRef));
+      SALOME_NamingService_Wrapper namingService(orb);
+      //int iii(0); std::cin >> iii;
+      {
+        SALOME_LifeCycleCORBA lcc(&namingService);
+        ostringstream containerName;
+        containerName << "localhost/YACSContainer";
+        Engines::EngineComponent_var comp = lcc.FindOrLoad_Component(containerName.str().c_str(), "YACS" );
+        _engineRef =YACS_ORB::YACS_Gen::_narrow(comp);
+        YASSERT(!CORBA::is_nil(_engineRef));
+      }
     }
 
   checkEndOfDataflow(); // --- to allow change of the _isRunning state