From 9efdcdc820a0d1512039b4d78e9d0e80966cc0d6 Mon Sep 17 00:00:00 2001 From: Ovidiu Mircescu Date: Fri, 5 Nov 2021 15:36:57 +0100 Subject: [PATCH] Fix Salome launcher in ssl mode to SINGLE_THREAD_MODEL. --- src/Launcher/SALOME_Launcher.cxx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/Launcher/SALOME_Launcher.cxx b/src/Launcher/SALOME_Launcher.cxx index 11d16abac..7731aa97a 100644 --- a/src/Launcher/SALOME_Launcher.cxx +++ b/src/Launcher/SALOME_Launcher.cxx @@ -719,8 +719,17 @@ SALOME_Launcher *KERNEL::getLauncherSA() int argc(0); CORBA::ORB_var orb = CORBA::ORB_init(argc,nullptr); PortableServer::POA_var root_poa=PortableServer::POA::_the_root_poa(); + PortableServer::POAManager_var pman = root_poa->the_POAManager(); + 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); + PortableServer::POA_var safePOA = root_poa->create_POA("SingleThreadPOA", + pman, + policies); + threadPol->destroy(); SALOME_Fake_NamingService *ns=new SALOME_Fake_NamingService(orb); - _launcher_singleton_ssl = new SALOME_Launcher(orb,root_poa,ns);//3rd arg is important to skip NS ! + _launcher_singleton_ssl = new SALOME_Launcher(orb,safePOA,ns);//3rd arg is important to skip NS ! } return _launcher_singleton_ssl; } -- 2.39.2