From: jfa Date: Wed, 9 Jan 2008 12:39:44 +0000 (+0000) Subject: NPAL18505: shutdownServers() function don't work if we have distributed containers. X-Git-Tag: for_M2008_07022008~16 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=891438908e6b62d3a938b9a9d583f5e2891f8614;p=modules%2Fkernel.git NPAL18505: shutdownServers() function don't work if we have distributed containers. --- diff --git a/idl/SALOME_ContainerManager.idl b/idl/SALOME_ContainerManager.idl index 5013b402d..c53d27a9c 100644 --- a/idl/SALOME_ContainerManager.idl +++ b/idl/SALOME_ContainerManager.idl @@ -85,6 +85,8 @@ struct MachineParameters void Shutdown(); + long getPID(); + } ; /*! \brief Interface of the %containerManager @@ -115,12 +117,8 @@ struct MachineParameters in ResPolicy policy, in CompoList componentList ); - oneway void ShutdownWithExit(); - void ShutdownContainers(); - long getPID(); - } ; /*! \brief Interface of the %resourcesManager diff --git a/src/Container/SALOME_ContainerManager.cxx b/src/Container/SALOME_ContainerManager.cxx index e8465c7af..043ed927d 100644 --- a/src/Container/SALOME_ContainerManager.cxx +++ b/src/Container/SALOME_ContainerManager.cxx @@ -102,23 +102,7 @@ void SALOME_ContainerManager::Shutdown() _NS->Destroy_Name(_ContainerManagerNameInNS); PortableServer::ObjectId_var oid = _poa->servant_to_id(this); _poa->deactivate_object(oid); - _remove_ref(); -} - -//============================================================================= -/*! CORBA method: - * shutdown the ContainerManager servant and kill the ContainerManager process - */ -//============================================================================= -void SALOME_ContainerManager::ShutdownWithExit() -{ - MESSAGE("ShutdownWithExit"); - if(!CORBA::is_nil(_orb)) - { - _orb->shutdown(0); - } - - //exit( EXIT_SUCCESS ); + //_remove_ref(); } //============================================================================= @@ -160,16 +144,6 @@ void SALOME_ContainerManager::ShutdownContainers() } } -//============================================================================= -/*! CORBA Method: - * Returns the PID of the container manager - */ -//============================================================================= -CORBA::Long SALOME_ContainerManager::getPID() -{ - return (CORBA::Long)getpid(); -} - //============================================================================= /*! CORBA Method: * Find a suitable Container in a list of machines, or start one diff --git a/src/Container/SALOME_ContainerManager.hxx b/src/Container/SALOME_ContainerManager.hxx index b3485ab63..34888f98c 100644 --- a/src/Container/SALOME_ContainerManager.hxx +++ b/src/Container/SALOME_ContainerManager.hxx @@ -60,11 +60,8 @@ public: const Engines::CompoList& componentList); void Shutdown(); - void ShutdownWithExit(); void ShutdownContainers(); - CORBA::Long getPID(); - static const char *_ContainerManagerNameInNS; // Parallel extension diff --git a/src/Launcher/SALOME_Launcher.cxx b/src/Launcher/SALOME_Launcher.cxx index 8ad02f628..3b73b7c02 100644 --- a/src/Launcher/SALOME_Launcher.cxx +++ b/src/Launcher/SALOME_Launcher.cxx @@ -93,11 +93,21 @@ void SALOME_Launcher::Shutdown() _ResManager->Shutdown(); PortableServer::ObjectId_var oid = _poa->servant_to_id(this); _poa->deactivate_object(oid); - _remove_ref(); + //_remove_ref(); if(!CORBA::is_nil(_orb)) _orb->shutdown(0); } +//============================================================================= +/*! CORBA Method: + * Returns the PID of the process + */ +//============================================================================= +CORBA::Long SALOME_Launcher::getPID() +{ + return (CORBA::Long)getpid(); +} + //============================================================================= /*! CORBA Method: * Submit a batch job on a cluster and returns the JobId diff --git a/src/Launcher/SALOME_Launcher.hxx b/src/Launcher/SALOME_Launcher.hxx index 5c83afbbf..08570fe72 100644 --- a/src/Launcher/SALOME_Launcher.hxx +++ b/src/Launcher/SALOME_Launcher.hxx @@ -64,6 +64,8 @@ public: void Shutdown(); + CORBA::Long getPID(); + static const char *_LauncherNameInNS; protected: diff --git a/src/ResourcesManager/SALOME_ResourcesManager.cxx b/src/ResourcesManager/SALOME_ResourcesManager.cxx index 20b689b1d..d693227a1 100644 --- a/src/ResourcesManager/SALOME_ResourcesManager.cxx +++ b/src/ResourcesManager/SALOME_ResourcesManager.cxx @@ -77,7 +77,7 @@ SALOME_ResourcesManager(CORBA::ORB_ptr orb, /*! * Standard constructor, parse resource file. * - if ${APPLI} exists in environment, - * look for ${HOME}/*{APPLI}/CatalogResources.xml + * look for ${HOME}/${APPLI}/CatalogResources.xml * - else look for default: * ${KERNEL_ROOT_DIR}/share/salome/resources/kernel/CatalogResources.xml * - parse XML resource file. @@ -142,7 +142,7 @@ void SALOME_ResourcesManager::Shutdown() _NS->Destroy_Name(_ResourcesManagerNameInNS); PortableServer::ObjectId_var oid = _poa->servant_to_id(this); _poa->deactivate_object(oid); - _remove_ref(); + //_remove_ref(); } //=============================================================================