]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Sessionless mode for calcium.
authorOvidiu Mircescu <ovidiu.mircescu@edf.fr>
Mon, 20 Dec 2021 15:37:08 +0000 (16:37 +0100)
committerOvidiu Mircescu <ovidiu.mircescu@edf.fr>
Mon, 20 Dec 2021 15:37:08 +0000 (16:37 +0100)
src/Container/CMakeLists.txt
src/Container/SALOME_Container.cxx
src/Container/SALOME_Container_Common.cxx
src/Container/SALOME_Container_Common.hxx
src/Container/SALOME_Container_No_NS_Serv.cxx
src/DSC/DSC_Basic/DSC_i.cxx
src/DSC/DSC_Basic/DSC_i.hxx
src/DSC/DSC_Python/dsccalcium.py
src/DSC/DSC_User/Superv_Component_i.hxx

index 8dbf5b00b2e6261471f6dcaf257c604e9cf7285b..0c497e0f9a5f3a8ebb82ff629ccf5523819eb61d 100644 (file)
@@ -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})
 
index aee7f06dd992458f8531100652835fd03763871c..f60905739332cdc3bde6ab6812c1c1174bd37810 100644 (file)
 // 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<SALOME_NamingService_Container_Abstract> ns;
-  return container_common_main(argc,argv,std::move(ns));
+  return container_common_main<Engines_Container_i>(argc,argv,std::move(ns));
 }
index 245802dd45d1c47712584af9b166d1bcec93c210..6f35440e3109a0b9a2a91d9a6ee0fdd0746c304b 100644 (file)
@@ -127,6 +127,7 @@ void unexpectedHandler(void)
   AttachDebugger();
 }
 
+template<class ContainerServant>
 int container_common_main(int argc, char* argv[], std::unique_ptr<SALOME_NamingService_Container_Abstract> ns)
 {
   setSSLMode(ns?!ns->IsTrueNS():false);
@@ -182,7 +183,7 @@ int container_common_main(int argc, char* argv[], std::unique_ptr<SALOME_NamingS
       system(aCommand.str().c_str());
 #endif
       
-      new Engines_Container_i(orb, root_poa, containerName , argc , argv, ns.get() );
+      new ContainerServant(orb, root_poa, containerName , argc , argv, ns.get() );
       ns.release();
 
       pman->activate();
index eed8ca82d88efb1bef1e7b5622a328bc3fe6e50a..2e23667ec76b8c7d907cd1e37aeac35f6960c46f 100644 (file)
@@ -24,4 +24,5 @@
 
 #include <memory>
 
+template<class ContainerServant>
 int CONTAINER_EXPORT container_common_main(int argc, char* argv[], std::unique_ptr<SALOME_NamingService_Container_Abstract> ns);
index 37818df899bc1cb985875cb5b9dcc8d65a959672..444f8490238482dee830ee47045a55334054cd97 100644 (file)
@@ -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<SALOME_NamingService_Container_Abstract> ns( new SALOME_Embedded_NamingService_Client(ns_serv_obj) );
-  return container_common_main(argc,argv,std::move(ns));
+  return container_common_main<Engines_Container_SSL_i>(argc,argv,std::move(ns));
 }
index b93fc5c1d08c40a2bd5163fee14d096ddfb5aa89..fcdeba8075748baa81a86538ac2174a4b3da1c86 100644 (file)
@@ -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;
index 8a9c57025ad0bc6513b702d05bfeb9f00382132d..faa603e27301e63a8cd752f6513740febd615254 100644 (file)
@@ -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();
 
index ebd98471e82e7f86231e8880aedbabcaeb130d9f..24720d6d32cbf700d292fd6a0314ed0b057f1ffd 100644 (file)
@@ -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
index 28471d3d4e38c9ea44d5bb37093275e192e71f87..721de6aa641a39801656f2a93b541402ce665f5e 100644 (file)
@@ -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.