- poa = PortableServer::POA::_narrow(obj);
- if(!CORBA::is_nil(poa))
- pman = poa->the_POAManager();
+ defaultPoa = PortableServer::POA::_narrow(obj);
+ if(!CORBA::is_nil(defaultPoa))
+ pman = defaultPoa->the_POAManager();
+
+ PortableServer::POAManager_var pman = defaultPoa->the_POAManager();
+ CORBA::PolicyList policies;
+ policies.length(2);
+ //PortableServer::ThreadPolicy_var threadPol(defaultPoa->create_thread_policy(PortableServer::SINGLE_THREAD_MODEL));
+ PortableServer::ThreadPolicy_var threadPol(defaultPoa->create_thread_policy(PortableServer::ORB_CTRL_MODEL)); // default for all POAs
+ PortableServer::ImplicitActivationPolicy_var implicitPol(defaultPoa->create_implicit_activation_policy(PortableServer::IMPLICIT_ACTIVATION)); // default for Root_POA, NO for others
+ policies[0] = PortableServer::ThreadPolicy::_duplicate(threadPol);
+ policies[1] = PortableServer::ImplicitActivationPolicy::_duplicate(implicitPol);
+ poa = defaultPoa->create_POA("KERNELStandaloneStudySingleThreadPOA",pman,policies);
+ threadPol->destroy();
+ SALOMEDS_Study_i::SetThePOA(poa);
+