From: prascle Date: Mon, 7 Feb 2005 07:03:57 +0000 (+0000) Subject: PR: Modif A.Geay, Shutdown container when servant alone X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7d930a2d3b091ed99fc85208ce36606a3eb431e0;p=modules%2Fyacs.git PR: Modif A.Geay, Shutdown container when servant alone --- diff --git a/src/Container/Container_i.cxx b/src/Container/Container_i.cxx index 914409756..b65bf13bd 100644 --- a/src/Container/Container_i.cxx +++ b/src/Container/Container_i.cxx @@ -64,8 +64,10 @@ Engines_Container_i::Engines_Container_i (CORBA::ORB_ptr orb, PortableServer::POA_ptr poa, char *containerName , int argc , char* argv[], - bool activAndRegist ) : - _numInstance(0) + bool activAndRegist, + bool isServantAloneInProcess + ) : + _numInstance(0),_isServantAloneInProcess(isServantAloneInProcess) { _pid = (long)getpid(); @@ -149,7 +151,8 @@ void Engines_Container_i::Shutdown() _NS->Destroy_Name(_containerName.c_str()); //_remove_ref(); //_poa->deactivate_object(*_id); - _orb->shutdown(0); + if(_isServantAloneInProcess) + _orb->shutdown(0); } //! Kill current container diff --git a/src/Container/SALOME_Container_i.hxx b/src/Container/SALOME_Container_i.hxx index 0aa0658ae..1f0eb93cc 100644 --- a/src/Container/SALOME_Container_i.hxx +++ b/src/Container/SALOME_Container_i.hxx @@ -52,7 +52,8 @@ public: PortableServer::POA_ptr poa, char * containerName , int argc, char* argv[], - bool activAndRegist = true); + bool activAndRegist = true, + bool isServantAloneInProcess = true); virtual ~Engines_Container_i(); @@ -98,7 +99,7 @@ protected: int _argc ; char** _argv ; long _pid; - + bool _isServantAloneInProcess; }; #endif diff --git a/src/Session/Session_ServerThread.cxx b/src/Session/Session_ServerThread.cxx index 9fa3e76af..eef032494 100644 --- a/src/Session/Session_ServerThread.cxx +++ b/src/Session/Session_ServerThread.cxx @@ -431,7 +431,7 @@ void Session_ServerThread::ActivateContainer(int argc, } Engines_Container_i * myContainer - = new Engines_Container_i(_orb, factory_poa, containerName , argc , argv ); + = new Engines_Container_i(_orb, factory_poa, containerName , argc , argv , true , false); } catch(CORBA::SystemException&) {