Previous Table of Contents Next


11.6.1 Getting the Root POA


   All server applications must obtain a reference to the root POA, either to use it directly to manage objects, or to create new POA objects. The following example demonstrates how the application server can obtain a reference to the root POA.

   // C++CORBA::ORB_ptr orb = CORBA::ORB_init(argc, argv);CORBA::Object_ptr pfobj = orb->resolve_initial_references(“RootPOA?);

   PortableServer::POA_ptr rootPOA;rootPOA = PortableServer::POA::narrow(pfobj);