]> SALOME platform Git repositories - modules/yacs.git/commitdiff
Salome HOME
PR: Modif A.Geay, Shutdown container when servant alone
authorprascle <prascle>
Mon, 7 Feb 2005 07:03:57 +0000 (07:03 +0000)
committerprascle <prascle>
Mon, 7 Feb 2005 07:03:57 +0000 (07:03 +0000)
src/Container/Container_i.cxx
src/Container/SALOME_Container_i.hxx
src/Session/Session_ServerThread.cxx

index 9144097567fd13f30d489d0bbe1570acc7834ba6..b65bf13bdc699ace327f474ac8f111e2124c8a3e 100644 (file)
@@ -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
index 0aa0658ae969cba2c41af7363e790ab0adb9a994..1f0eb93cc523e7fc83a71cc79063edc8d62354bf 100644 (file)
@@ -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
index 9fa3e76afd30117dfd1da03f5eabbaabb062a595..eef03249457867bbb792435ebb5ce34a080036ba 100644 (file)
@@ -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&)
     {