]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
#29456 [EDF] (2022-T1) Finalization of SSL implementation rnv/29456
authorrnv <rnv@opencascade.com>
Thu, 14 Apr 2022 16:01:10 +0000 (19:01 +0300)
committerrnv <rnv@opencascade.com>
Thu, 14 Apr 2022 16:01:10 +0000 (19:01 +0300)
12 files changed:
src/CMakeLists.txt
src/SMESHClient/SMESH_Client.cxx
src/SMESHGUI/SMESHGUI.cxx
src/SMESH_I/CMakeLists.txt
src/SMESH_I/SMESH_Component_Generator.cxx [deleted file]
src/SMESH_I/SMESH_Component_Generator.hxx [deleted file]
src/SMESH_SWIG/SMeshHelper.cxx
src/SMESH_SWIG/SMeshHelper.h
src/SMESH_SWIG/SMeshHelper.i
src/SalomeSessionless/CMakeLists.txt [deleted file]
src/SalomeSessionless/MeshJobManager_SalomeSessionless.py [deleted file]
src/SalomeSessionless/SMESH_SalomeSessionless.py [deleted file]

index c380973153aa309143babb4a4dc105ccb0e0271a..f63de3a1dc36c77c69d4d79d7315dc3ec21db517 100644 (file)
@@ -40,7 +40,6 @@ SET(SUBDIRS_COMMON
   StdMeshers_I
   SMESH_PY
   Tools
-  SalomeSessionless
 )
 
 IF(SALOME_SMESH_ENABLE_MEFISTO)
index 6e0c37a5ae004840c265c5db3227f95d7628b26b..4370946ae8c213c7cd9d8f6f2c53be420ee8ea7e 100644 (file)
@@ -28,7 +28,6 @@
 #include "SMESHDS_Mesh.hxx"
 #include "SMESHDS_Script.hxx"
 #include "SMESH_Mesh.hxx"
-#include "SMESH_Component_Generator.hxx"
 
 #include "SALOME_NamingService.hxx"
 #include "SALOME_Fake_NamingService.hxx"
@@ -790,39 +789,30 @@ SMESH_Client::GetSMESHGen(CORBA::ORB_ptr theORB,
 
   if(CORBA::is_nil(aMeshGen.in()))
   {
-    Engines::EngineComponent_var isCompoInSSLMode = GetSMESHInstanceHasThis();
-    if( CORBA::is_nil(isCompoInSSLMode) )
-    {
 #ifdef WIN32
-      long aClientPID = (long)_getpid();
+    long aClientPID = (long)_getpid();
 #else
-      long aClientPID =  (long)getpid();
+    long aClientPID =  (long)getpid();
 #endif
 
-      std::unique_ptr<SALOME_NamingService_Abstract> aNamingService;
-      if(getSSLMode())
-      {
-        aNamingService.reset(new SALOME_Fake_NamingService);
-      }
-      else
-      {
-        aNamingService.reset(new SALOME_NamingService(theORB));
-      }
-      SALOME_LifeCycleCORBA aLifeCycleCORBA(aNamingService.get());
-      Engines::EngineComponent_var aComponent = aLifeCycleCORBA.FindOrLoad_Component("FactoryServer","SMESH");
-      aMeshGen = SMESH::SMESH_Gen::_narrow(aComponent);
-
-      std::string aClientHostName = Kernel_Utils::GetHostname();
-      Engines::Container_var aServerContainer = aMeshGen->GetContainerRef();
-      CORBA::String_var aServerHostName = aServerContainer->getHostName();
-      CORBA::Long aServerPID = aServerContainer->getPID();
-      aMeshGen->SetEmbeddedMode((aClientPID == aServerPID) && (aClientHostName == aServerHostName.in()));
+    std::unique_ptr<SALOME_NamingService_Abstract> aNamingService;
+    if(getSSLMode())
+    {
+      aNamingService.reset(new SALOME_Fake_NamingService);
     }
     else
     {
-      aMeshGen = SMESH::SMESH_Gen::_narrow(isCompoInSSLMode);
+      aNamingService.reset(new SALOME_NamingService(theORB));
     }
-    
+    SALOME_LifeCycleCORBA aLifeCycleCORBA(aNamingService.get());
+    Engines::EngineComponent_var aComponent = aLifeCycleCORBA.FindOrLoad_Component("FactoryServer","SMESH");
+    aMeshGen = SMESH::SMESH_Gen::_narrow(aComponent);
+
+    std::string aClientHostName = Kernel_Utils::GetHostname();
+    Engines::Container_var aServerContainer = aMeshGen->GetContainerRef();
+    CORBA::String_var aServerHostName = aServerContainer->getHostName();
+    CORBA::Long aServerPID = aServerContainer->getPID();
+    aMeshGen->SetEmbeddedMode((aClientPID == aServerPID) && (aClientHostName == aServerHostName.in()));
   }
   theIsEmbeddedMode = aMeshGen->IsEmbeddedMode();
   return aMeshGen;
index 7023bf4273f72443115bd8c355819e97771a79de..ed565252426d746af3557ea0e1fee848b67f02ab 100644 (file)
 #include "SMESH_ControlsDef.hxx"
 #include "SMESH_ScalarBarActor.h"
 #include "SMESH_TypeFilter.hxx"
-#include "SMESH_Component_Generator.hxx"
 
 // SALOME GUI includes
 #include <LightApp_DataOwner.h>
index 0ce820e3abddfeb1b150cf88171b695f6bb66886..fb731860160d8dfcc867a902695b480451dbf9d7 100644 (file)
@@ -113,7 +113,6 @@ SET(SMESHEngine_HEADERS
   SMESH_PreMeshInfo.hxx
   SMESH_MeshPartDS.hxx
   SMESH.hxx
-  SMESH_Component_Generator.hxx
   MG_ADAPT_i.hxx
   SMESH_Homard_i.hxx
 )
@@ -143,7 +142,6 @@ SET(SMESHEngine_SOURCES
   SMESH_NoteBook.cxx
   SMESH_Measurements_i.cxx
   SMESH_PreMeshInfo.cxx
-  SMESH_Component_Generator.cxx
   MG_ADAPT_i.cxx
   SMESH_Homard_i.cxx
 )
diff --git a/src/SMESH_I/SMESH_Component_Generator.cxx b/src/SMESH_I/SMESH_Component_Generator.cxx
deleted file mode 100644 (file)
index 0a1a1d9..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (C) 2021  CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#include "SMESH_Component_Generator.hxx"
-
-#include "SMESH_Gen_No_Session_i.hxx"
-#include "SALOME_Container_i.hxx"
-#include "SALOME_KernelServices.hxx"
-
-#include "SALOME_Fake_NamingService.hxx"
-
-#include <cstring>
-
-static Engines::EngineComponent_var _unique_compo;
-
-Engines::EngineComponent_var RetrieveSMESHInstance()
-{
-  if (CORBA::is_nil(_unique_compo))
-  {
-    CORBA::ORB_var orb;
-    {
-      int argc(0);
-      orb = CORBA::ORB_init(argc, nullptr);
-    }
-    CORBA::Object_var obj = orb->resolve_initial_references("RootPOA");
-    PortableServer::POA_var poa = PortableServer::POA::_narrow(obj);
-    PortableServer::POAManager_var pman = poa->the_POAManager();
-    CORBA::PolicyList policies;
-    policies.length(0);
-    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);
-    _unique_compo = Engines::EngineComponent::_narrow(zeRef);
-  }
-  return _unique_compo;
-}
-
-Engines::EngineComponent_var GetSMESHInstanceHasThis()
-{
-  return _unique_compo;
-}
diff --git a/src/SMESH_I/SMESH_Component_Generator.hxx b/src/SMESH_I/SMESH_Component_Generator.hxx
deleted file mode 100644 (file)
index db796a5..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright (C) 2021  CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#pragma once
-
-#include "SMESH.hxx"
-
-#include "SALOMEconfig.h"
-
-#include CORBA_SERVER_HEADER(SMESH_Gen)
-
-SMESH_I_EXPORT Engines::EngineComponent_var RetrieveSMESHInstance();
-SMESH_I_EXPORT Engines::EngineComponent_var GetSMESHInstanceHasThis();
index 92991e20c66b8a6ebc61bfa07ac5069b124f79f6..c053da46eb97593c561be5b0acb5dd9b9081b44c 100644 (file)
 
 #include "SALOME_KernelServices.hxx"
 
-#include "SMESH_Component_Generator.hxx"
-
 #include <cstring>
 
 #include <DriverGMF_Read.hxx>
 #include <SMESH_MGLicenseKeyGen.hxx>
 
-
-std::string BuildSMESHInstanceInternal()
-{
-  Engines::EngineComponent_var zeRef = RetrieveSMESHInstance();
-  CORBA::String_var ior = KERNEL::getORB()->object_to_string(zeRef);
-  return std::string(ior.in());
-}
-
 std::string GetMGLicenseKeyImpl(const char* gmfFile)
 {
   smIdType nbVertex, nbEdge, nbFace, nbVol;
index 9c912869ebadc71da439a40f3f350791ee975a4c..009217d4ac205ea81f7ee348eb3f0564b9996010 100644 (file)
@@ -21,6 +21,4 @@
 
 #include <string>
 
-std::string BuildSMESHInstanceInternal();
-
 std::string GetMGLicenseKeyImpl(const char* gmfFile);
index d1220cb9021e06fbafbae93c6cd32ba575468d60..0bc9be16210282d54f3a4d05d4ba10cd1bf0e5b5 100644 (file)
 
 %inline
 {
-  std::string BuildSMESHInstance()
-  {
-    return BuildSMESHInstanceInternal();
-  }
-
   std::string GetMGLicenseKey(const char* gmfFile)
   {
     return GetMGLicenseKeyImpl( gmfFile );
diff --git a/src/SalomeSessionless/CMakeLists.txt b/src/SalomeSessionless/CMakeLists.txt
deleted file mode 100644 (file)
index dc1c5dc..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-# Copyright (C) 2021  CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-SET(_bin_SCRIPTS
-  SMESH_SalomeSessionless.py
-  MeshJobManager_SalomeSessionless.py
-)
-
-SALOME_INSTALL_SCRIPTS("${_bin_SCRIPTS}" ${SALOME_INSTALL_PYTHON} DEF_PERMS)
diff --git a/src/SalomeSessionless/MeshJobManager_SalomeSessionless.py b/src/SalomeSessionless/MeshJobManager_SalomeSessionless.py
deleted file mode 100644 (file)
index 50f5d1f..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2021  CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-def buildInstance(orb):
-    import SMeshPadderHelper
-    padder_ior = SMeshPadderHelper.BuildPadderMeshJobManagerInstance()
-    import MESHJOB
-    import CORBA
-    orb=CORBA.ORB_init([''])
-    padderInst = orb.string_to_object(padder_ior)
-    return padderInst, orb
diff --git a/src/SalomeSessionless/SMESH_SalomeSessionless.py b/src/SalomeSessionless/SMESH_SalomeSessionless.py
deleted file mode 100644 (file)
index d4676de..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2021  CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-def buildInstance(orb):
-    import SMeshHelper
-    smesh_ior = SMeshHelper.BuildSMESHInstance()
-    import SMESH
-    import CORBA
-    orb=CORBA.ORB_init([''])
-    smeshInst = orb.string_to_object(smesh_ior)
-    return smeshInst, orb