From b926ff3641262233a344108027d5becafdce7dd3 Mon Sep 17 00:00:00 2001 From: Anthony Geay Date: Fri, 5 Jan 2018 16:00:42 +0100 Subject: [PATCH] Because an order can t be discussed --- src/SALOMESDS/SALOMESDS_RequestSwitcher.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/SALOMESDS/SALOMESDS_RequestSwitcher.cxx b/src/SALOMESDS/SALOMESDS_RequestSwitcher.cxx index 22edf72c4..e4a0e2bc8 100644 --- a/src/SALOMESDS/SALOMESDS_RequestSwitcher.cxx +++ b/src/SALOMESDS/SALOMESDS_RequestSwitcher.cxx @@ -20,10 +20,13 @@ #include "SALOMESDS_RequestSwitcher.hxx" +#include + using namespace SALOMESDS; RequestSwitcherBase::RequestSwitcherBase(CORBA::ORB_ptr orb) { + static int iii=0; CORBA::Object_var obj(orb->resolve_initial_references("RootPOA")); PortableServer::POA_var poa(PortableServer::POA::_narrow(obj)); _poa_manager_under_control=poa->the_POAManager(); @@ -34,7 +37,9 @@ RequestSwitcherBase::RequestSwitcherBase(CORBA::ORB_ptr orb) policies[0]=PortableServer::ThreadPolicy::_duplicate(threadPol); // all is in PortableServer::POAManager::_nil. By specifying _nil cf Advanced CORBA Programming with C++ p 506 // a new POA manager is created. This POA manager is independent from POA manager of the son ones. - _poa_for_request_control=poa->create_POA("4RqstSwitcher",PortableServer::POAManager::_nil(),policies); + std::ostringstream poaName; + poaName << "4RqstSwitcher_" << iii++; + _poa_for_request_control=poa->create_POA(poaName.str().c_str(),PortableServer::POAManager::_nil(),policies); threadPol->destroy(); PortableServer::POAManager_var mgr(_poa_for_request_control->the_POAManager()); mgr->activate(); -- 2.39.2