From 938ae826651b8f9eb79b8b6fb104b28d465e1073 Mon Sep 17 00:00:00 2001 From: Ovidiu Mircescu Date: Mon, 20 Dec 2021 16:37:08 +0100 Subject: [PATCH] Sessionless mode for calcium. --- src/Container/CMakeLists.txt | 2 +- src/Container/SALOME_Container.cxx | 5 +++-- src/Container/SALOME_Container_Common.cxx | 3 ++- src/Container/SALOME_Container_Common.hxx | 1 + src/Container/SALOME_Container_No_NS_Serv.cxx | 5 +++-- src/DSC/DSC_Basic/DSC_i.cxx | 7 +++++-- src/DSC/DSC_Basic/DSC_i.hxx | 4 ++-- src/DSC/DSC_Python/dsccalcium.py | 2 -- src/DSC/DSC_User/Superv_Component_i.hxx | 2 +- 9 files changed, 18 insertions(+), 13 deletions(-) diff --git a/src/Container/CMakeLists.txt b/src/Container/CMakeLists.txt index 8dbf5b00b..0c497e0f9 100644 --- a/src/Container/CMakeLists.txt +++ b/src/Container/CMakeLists.txt @@ -99,7 +99,7 @@ SET(SALOME_Container_LIBS ${MPI_LIBRARIES} ) -ADD_LIBRARY(SalomeContainerServer SALOME_Container_Common.cxx SALOME_Container_SignalsHandler.cxx) +ADD_LIBRARY(SalomeContainerServer SALOME_Container_SignalsHandler.cxx) TARGET_LINK_LIBRARIES(SalomeContainerServer ${SALOME_Container_LIBS}) INSTALL(TARGETS SalomeContainerServer EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) diff --git a/src/Container/SALOME_Container.cxx b/src/Container/SALOME_Container.cxx index aee7f06dd..f60905739 100644 --- a/src/Container/SALOME_Container.cxx +++ b/src/Container/SALOME_Container.cxx @@ -17,11 +17,12 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -#include "SALOME_Container_Common.hxx" +#include "SALOME_Container_Common.cxx" #include "SALOME_NamingService.hxx" +#include "SALOME_Container_i.hxx" int main(int argc, char* argv[]) { std::unique_ptr ns; - return container_common_main(argc,argv,std::move(ns)); + return container_common_main(argc,argv,std::move(ns)); } diff --git a/src/Container/SALOME_Container_Common.cxx b/src/Container/SALOME_Container_Common.cxx index 245802dd4..6f35440e3 100644 --- a/src/Container/SALOME_Container_Common.cxx +++ b/src/Container/SALOME_Container_Common.cxx @@ -127,6 +127,7 @@ void unexpectedHandler(void) AttachDebugger(); } +template int container_common_main(int argc, char* argv[], std::unique_ptr ns) { setSSLMode(ns?!ns->IsTrueNS():false); @@ -182,7 +183,7 @@ int container_common_main(int argc, char* argv[], std::unique_ptractivate(); diff --git a/src/Container/SALOME_Container_Common.hxx b/src/Container/SALOME_Container_Common.hxx index eed8ca82d..2e23667ec 100644 --- a/src/Container/SALOME_Container_Common.hxx +++ b/src/Container/SALOME_Container_Common.hxx @@ -24,4 +24,5 @@ #include +template int CONTAINER_EXPORT container_common_main(int argc, char* argv[], std::unique_ptr ns); diff --git a/src/Container/SALOME_Container_No_NS_Serv.cxx b/src/Container/SALOME_Container_No_NS_Serv.cxx index 37818df89..444f84902 100644 --- a/src/Container/SALOME_Container_No_NS_Serv.cxx +++ b/src/Container/SALOME_Container_No_NS_Serv.cxx @@ -17,7 +17,8 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -#include "SALOME_Container_Common.hxx" +#include "SALOME_Container_Common.cxx" +#include "SALOME_Container_i.hxx" #include "SALOME_Embedded_NamingService_Client.hxx" #include "Utils_SALOME_Exception.hxx" #include "SALOME_KernelORB.hxx" @@ -37,5 +38,5 @@ int main(int argc, char* argv[]) if( CORBA::is_nil(ns_serv_obj) ) THROW_SALOME_EXCEPTION( "SALOME_Container_No_NS_Serv : argument 2 is NOT a valid IOR of Engines::EmbeddedNamingService" ); std::unique_ptr ns( new SALOME_Embedded_NamingService_Client(ns_serv_obj) ); - return container_common_main(argc,argv,std::move(ns)); + return container_common_main(argc,argv,std::move(ns)); } diff --git a/src/DSC/DSC_Basic/DSC_i.cxx b/src/DSC/DSC_Basic/DSC_i.cxx index b93fc5c1d..fcdeba807 100644 --- a/src/DSC/DSC_Basic/DSC_i.cxx +++ b/src/DSC/DSC_Basic/DSC_i.cxx @@ -34,11 +34,14 @@ Engines_DSC_i(CORBA::ORB_ptr orb, PortableServer::ObjectId * contId, const char *instanceName, const char *interfaceName, - bool /*notif*/) : Engines_Component_i(orb, + bool notif) : Engines_Component_i(orb, poa, contId, instanceName, - interfaceName) + interfaceName, + notif, + false + ) { #ifdef MYDEBUG std::cerr << "--Engines_DSC_i: MARK 1 --" << instanceName << "----" << std::endl; diff --git a/src/DSC/DSC_Basic/DSC_i.hxx b/src/DSC/DSC_Basic/DSC_i.hxx index 8a9c57025..faa603e27 100644 --- a/src/DSC/DSC_Basic/DSC_i.hxx +++ b/src/DSC/DSC_Basic/DSC_i.hxx @@ -62,8 +62,8 @@ public: Engines::Container_ptr container, const char *instanceName, const char *interfaceName, - bool notif = false, - bool regist = true ); + bool notif = false, + bool regist = false ); virtual ~Engines_DSC_i(); diff --git a/src/DSC/DSC_Python/dsccalcium.py b/src/DSC/DSC_Python/dsccalcium.py index ebd98471e..24720d6d3 100644 --- a/src/DSC/DSC_Python/dsccalcium.py +++ b/src/DSC/DSC_Python/dsccalcium.py @@ -46,8 +46,6 @@ class PyDSCComponent(SALOME_ComponentPy.SALOME_ComponentPy_i, SALOME_DriverPy.SALOME_DriverPy_i.__init__(self, interfaceName) # create the DSC proxy self.proxy=calcium.PySupervCompo(orb,poa,contID,instanceName,interfaceName ) - # Store a reference on naming service in _naming_service attribute - self._naming_service = SALOME_ComponentPy.SALOME_NamingServicePy_i( self._orb ) def init_service(self,service): return True diff --git a/src/DSC/DSC_User/Superv_Component_i.hxx b/src/DSC/DSC_User/Superv_Component_i.hxx index 28471d3d4..721de6aa6 100644 --- a/src/DSC/DSC_User/Superv_Component_i.hxx +++ b/src/DSC/DSC_User/Superv_Component_i.hxx @@ -67,7 +67,7 @@ public: const char *instanceName, const char *interfaceName, bool notif = false, - bool regist = true ); + bool regist = false ); virtual ~Superv_Component_i(); // Exceptions declarations. -- 2.39.2