X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSALOMEDS%2FSALOMEDS.cxx;h=b0e5c2aa3fc2be2b0797fa8bd8ca11623858b07d;hb=495acf55df01f2587dec216530056731338a38f3;hp=2d86b26de6f34157141879e41fcbb2e5891d8db9;hpb=d9ed049b89cfff4d8d96f0247ac5f2ec0200e3d0;p=modules%2Fkernel.git diff --git a/src/SALOMEDS/SALOMEDS.cxx b/src/SALOMEDS/SALOMEDS.cxx index 2d86b26de..b0e5c2aa3 100644 --- a/src/SALOMEDS/SALOMEDS.cxx +++ b/src/SALOMEDS/SALOMEDS.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2019 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -38,6 +38,8 @@ #include "SALOMEDS_Defines.hxx" +#include + // IDL headers #include #include CORBA_SERVER_HEADER(SALOMEDS) @@ -110,6 +112,19 @@ extern "C" CORBA::Object_var obj = namingService.Resolve( "/Study" ); SALOMEDS::Study_var aStudy = SALOMEDS::Study::_narrow( obj ); if( CORBA::is_nil(aStudy) ) { + PortableServer::POAManager_var pman = root_poa->the_POAManager(); + CORBA::PolicyList policies; + policies.length(2); + //PortableServer::ThreadPolicy_var threadPol(root_poa->create_thread_policy(PortableServer::SINGLE_THREAD_MODEL)); + PortableServer::ThreadPolicy_var threadPol(root_poa->create_thread_policy(PortableServer::ORB_CTRL_MODEL)); + PortableServer::ImplicitActivationPolicy_var implicitPol(root_poa->create_implicit_activation_policy(PortableServer::IMPLICIT_ACTIVATION)); + policies[0] = PortableServer::ThreadPolicy::_duplicate(threadPol); + policies[1] = PortableServer::ImplicitActivationPolicy::_duplicate(implicitPol); + PortableServer::POA_var poa = root_poa->create_POA("KERNELStudySingleThreadPOA",pman,policies); + MESSAGE("CreateStudy: KERNELStudySingleThreadPOA: "<< poa); + threadPol->destroy(); + + SALOMEDS_Study_i::SetThePOA(poa); SALOMEDS_Study_i* aStudy_i = new SALOMEDS_Study_i(orb); // Activate the objects. This tells the POA that the objects are ready to accept requests.