Previous | Table of Contents | Next |
For a variety of reasons, a server application might want to create a new POA. The POA is created as a child of an existing
POA. In this example, it is created as a child of the root POA.
// C++CORBA::PolicyList policies(2);policies.length(2);policies[0] = rootPOA->create_thread_policy( PortableServer::ThreadPolicy::ORB_CTRL_MODEL);policies[1] = rootPOA->create_lifespan_policy( PortableServer::LifespanPolicy::TRANSIENT);PortableServer::POA_ptr poa = rootPOA->create_POA(“my_little_poa?,PortableServer::POAManager::_nil(), policies);