]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
*** empty log message ***
authorageay <ageay>
Thu, 20 Jan 2005 07:41:04 +0000 (07:41 +0000)
committerageay <ageay>
Thu, 20 Jan 2005 07:41:04 +0000 (07:41 +0000)
src/Container/Container_i.cxx
src/Container/SALOME_Container.cxx
src/Container/SALOME_ContainerManager.cxx
src/Container/SALOME_ContainerManagerServer.cxx [deleted file]

index 05ebef448ab29c8b21b905fad1db6c423e3b7d1d..c71dc202685e2b144e81932a6d8eb54cede65a16 100644 (file)
@@ -123,7 +123,6 @@ Engines_Container_i::~Engines_Container_i()
 {
   MESSAGE("Container_i::~Container_i()");
   delete _id;
-  cout << "Engines_Container_i ~~~~~~~~~~~~~~" << endl;
 }
 
 char* Engines_Container_i::name()
index ae31b29a659f797c023e6add3c091520367aec8d..4e338201582120bab4bbd1b82d2f49897e18b8dc 100644 (file)
@@ -140,47 +140,14 @@ int main(int argc, char* argv[])
        break;
     }
     
-    // define policy objects     
-    PortableServer::ImplicitActivationPolicy_var implicitActivation =
-      root_poa->create_implicit_activation_policy(PortableServer::NO_IMPLICIT_ACTIVATION) ;
-    
-    // default = NO_IMPLICIT_ACTIVATION
-    PortableServer::ThreadPolicy_var threadPolicy =
-      root_poa->create_thread_policy(PortableServer::ORB_CTRL_MODEL);
-    // default = ORB_CTRL_MODEL, other choice SINGLE_THREAD_MODEL
-    
-    // create policy list
-    CORBA::PolicyList policyList;
-    policyList.length(2);
-    policyList[0] = PortableServer::ImplicitActivationPolicy::_duplicate(implicitActivation) ;
-    policyList[1] = PortableServer::ThreadPolicy::_duplicate(threadPolicy) ;
-    
-    // create the child POA
-    PortableServer::POAManager_var nil_mgr = PortableServer::POAManager::_nil() ;
-    PortableServer::POA_var factory_poa =
-      root_poa->create_POA("factory_poa", pman, policyList) ;
-    //with nil_mgr instead of pman, a new POA manager is created with the new POA
-    
-    // destroy policy objects
-    implicitActivation->destroy() ;
-    threadPolicy->destroy() ;
-    
     char *containerName = "";
     if(argc > 1){
       containerName = argv[1] ;
     }
     
     Engines_Container_i * myContainer 
-      = new Engines_Container_i(orb, factory_poa, containerName , argc , argv );
-    
-    //     Engines_Container_i * myContainer 
-    //      = new Engines_Container_i(string(argv[1]),string(argv[2]), orb, factory_poa);
-    
-    // use naming service
-    //     myContainer->_NS.init_orb(orb);
-    //     Engines::Container_ptr pCont = Engines::Container::_narrow(myContainer->_this());
-    //     myContainer->_NS.Register(pCont, argv[2]); 
-    
+      = new Engines_Container_i(orb, root_poa, containerName , argc , argv );
+
     pman->activate();
     
 #ifdef CHECKTIME
index 367380e35ba74f058931879bc5bf751cee887fe0..14e377405abcbea8fce0310fe822ffbebacac4ba 100644 (file)
@@ -18,7 +18,6 @@ SALOME_ContainerManager::SALOME_ContainerManager(CORBA::ORB_ptr orb)
   PortableServer::ObjectId_var id=root_poa->activate_object(this);
   CORBA::Object_var obj=root_poa->id_to_reference(id);
   Engines::ContainerManager_var refContMan = Engines::ContainerManager::_narrow(obj);
-  cout << "SALOME_ContainerManager constructor ***** " << endl;
   _NS->Register(refContMan,_ContainerManagerNameInNS);
 }
 
@@ -61,11 +60,7 @@ Engines::Container_ptr SALOME_ContainerManager::FindOrStartContainer(const char
   if(theMachine==GetHostname())
     command=_ResManager.BuildCommandToLaunchLocalContainer(containerName);
   else
-    {
-      cout << "SALOME_ContainerManager::FindOrStartContainer -- Building file ..." << endl;
-      command=_ResManager.BuildTempFileToLaunchRemoteContainer(theMachine,containerName);
-      cout << "SALOME_ContainerManager::FindOrStartContainer -- Building file done !!! ..." << endl;
-    }
+    command=_ResManager.BuildTempFileToLaunchRemoteContainer(theMachine,containerName);
   _ResManager.RmTmpFile();
   int status=system(command.c_str());
   if (status == -1) {
@@ -96,17 +91,13 @@ Engines::Container_ptr SALOME_ContainerManager::FindOrStartContainer(const char
 
 Engines::MachineList *SALOME_ContainerManager::GetFittingResources(const Engines::MachineParameters& params, const char *componentName)
 {
-  cout << "*********SALOME_ContainerManager::GetFittingResources" << endl;
   vector<string> vec=_ResManager.GetFittingResources(params,componentName);
   Engines::MachineList *ret=new Engines::MachineList;
   ret->length(vec.size());
-  cout << "*********SALOME_ContainerManager::GetFittingResources 2" << endl;
   for(unsigned int i=0;i<vec.size();i++)
     {
       (*ret)[i]=(vec[i]).c_str();
-      cout << "*********SALOME_ContainerManager::GetFittingResources -- " << vec[i] << endl;
     }
-  cout << "*********SALOME_ContainerManager::GetFittingResources 3" << endl;
   return ret;
 }
 
diff --git a/src/Container/SALOME_ContainerManagerServer.cxx b/src/Container/SALOME_ContainerManagerServer.cxx
deleted file mode 100644 (file)
index d48768f..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-#include "SALOME_ContainerManager.hxx"
-#include "SALOME_NamingService.hxx"
-#include "Utils_ORB_INIT.hxx"
-#include "Utils_SINGLETON.hxx"
-#include "LocalTraceCollector.hxx"
-
-#include <iostream>
-
-using namespace std;
-
-int main(int argc, char *argv[])
-{
-  ORB_INIT &init = *SINGLETON_<ORB_INIT>::Instance() ;
-  CORBA::ORB_var &orb = init( argc , argv ) ;
-  LocalTraceCollector *myThreadTrace = LocalTraceCollector::instance(orb);
-  try { 
-    SALOME_NamingService *ns=new SALOME_NamingService(orb);
-    SALOME_ContainerManager *contManager=new SALOME_ContainerManager(ns);
-    //Engines::ContainerManager_ptr contManagerServant=contManager->_this();
-    //ns->Register(contManagerServant,SALOME_ContainerManager::_ContainerManagerNameInNS);
-    CORBA::Object_var obj = orb->resolve_initial_references("RootPOA");
-    PortableServer::POA_var root_poa = PortableServer::POA::_narrow(obj);
-    PortableServer::POAManager_var pman = root_poa->the_POAManager();
-    pman->activate();
-    orb->run();
-    delete myThreadTrace;
-  }catch(CORBA::SystemException&){
-    INFOS("Caught CORBA::SystemException.");
-  }catch(PortableServer::POA::WrongPolicy&){
-    INFOS("Caught CORBA::WrongPolicyException.");
-  }catch(PortableServer::POA::ServantAlreadyActive&){
-    INFOS("Caught CORBA::ServantAlreadyActiveException");
-  }catch(CORBA::Exception&){
-    INFOS("Caught CORBA::Exception.");
-  }catch(std::exception& exc){
-    INFOS("Caught std::exception - "<<exc.what()); 
-  }catch(...){
-    INFOS("Caught unknown exception.");
-  }
-}
-