From 40442c956a33e015447f389717a253ea5fcaad71 Mon Sep 17 00:00:00 2001 From: ageay Date: Tue, 8 Mar 2005 06:10:04 +0000 Subject: [PATCH] This servant must be invoked remotely sequentially to prevent that concurrent invocation of lcc.FindOrLoadComponent needed during containers launching corrupt data. --- src/Container/SALOME_ContainerManager.cxx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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); } -- 2.39.2