From: ageay Date: Tue, 8 Mar 2005 06:26:06 +0000 (+0000) Subject: This servant must be invoked remotely sequentially to prevent that concurrent invocat... X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e52b062033a52b93d818ecb7c8c97a0edbe2069c;p=modules%2Fkernel.git This servant must be invoked remotely sequentially to prevent that concurrent invocation of lcc.FindOrLoadComponent needed during containers launching corrupt data. --- diff --git a/src/Container/SALOME_ContainerManager.cxx b/src/Container/SALOME_ContainerManager.cxx index d5fad0ae9..77cebf354 100644 --- a/src/Container/SALOME_ContainerManager.cxx +++ b/src/Container/SALOME_ContainerManager.cxx @@ -15,8 +15,16 @@ SALOME_ContainerManager::SALOME_ContainerManager(CORBA::ORB_ptr orb) { _NS=new SALOME_NamingService(orb); PortableServer::POA_var root_poa=PortableServer::POA::_the_root_poa(); - PortableServer::ObjectId_var id=root_poa->activate_object(this); - CORBA::Object_var obj=root_poa->id_to_reference(id); + PortableServer::POAManager_var pman = root_poa->the_POAManager(); + PortableServer::POA_var my_poa; + CORBA::PolicyList policies; + policies.length(1); + PortableServer::ThreadPolicy_var threadPol=root_poa->create_thread_policy(PortableServer::SINGLE_THREAD_MODEL); + policies[0]=PortableServer::ThreadPolicy::_duplicate(threadPol); + my_poa=root_poa->create_POA("SThreadPOA",pman,policies); + threadPol->destroy(); + PortableServer::ObjectId_var id=my_poa->activate_object(this); + CORBA::Object_var obj=my_poa->id_to_reference(id); Engines::ContainerManager_var refContMan = Engines::ContainerManager::_narrow(obj); _NS->Register(refContMan,_ContainerManagerNameInNS); }