From 2cf9eb829b257997b13ffebe1a234d15ed17ed4b Mon Sep 17 00:00:00 2001 From: ageay Date: Thu, 20 Jan 2005 07:41:04 +0000 Subject: [PATCH] *** empty log message *** --- src/Container/Container_i.cxx | 1 - src/Container/SALOME_Container.cxx | 37 +---------------- src/Container/SALOME_ContainerManager.cxx | 11 +---- .../SALOME_ContainerManagerServer.cxx | 41 ------------------- 4 files changed, 3 insertions(+), 87 deletions(-) delete mode 100644 src/Container/SALOME_ContainerManagerServer.cxx diff --git a/src/Container/Container_i.cxx b/src/Container/Container_i.cxx index 05ebef448..c71dc2026 100644 --- a/src/Container/Container_i.cxx +++ b/src/Container/Container_i.cxx @@ -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() diff --git a/src/Container/SALOME_Container.cxx b/src/Container/SALOME_Container.cxx index ae31b29a6..4e3382015 100644 --- a/src/Container/SALOME_Container.cxx +++ b/src/Container/SALOME_Container.cxx @@ -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 diff --git a/src/Container/SALOME_ContainerManager.cxx b/src/Container/SALOME_ContainerManager.cxx index 367380e35..14e377405 100644 --- a/src/Container/SALOME_ContainerManager.cxx +++ b/src/Container/SALOME_ContainerManager.cxx @@ -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 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 - -using namespace std; - -int main(int argc, char *argv[]) -{ - ORB_INIT &init = *SINGLETON_::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 - "<