CORBA::ORB_var orb = CORBA::ORB_init(argc, argv); PortableServer::POA_var rootPoa = PortableServer::POA::_narrow( orb->resolve_initial_references("RootPOA"));
CORBA::ORB_var orb = CORBA::ORB_init(argc, argv); CosNaming::NamingContext_var namingCtx = CosNaming::NamingContext::_narrow( orb->resolve_initial_references("NameService"));
CORBA::ORB_var orb = CORBA::ORB_init(argc, argv); PortableServer::POA_var rootPoa = PortableServer::POA::_narrow( orb->resolve_initial_references("RootPOA")); IORTable::Table_var iorTable = IORTable::Table::_narrow( rootPoa->the_POAManager()->get_proxy()->resolve("IORTable"));In this example, we initialize the ORB and get a reference to the root POA using the "RootPOA" identifier. Then, we use the POA to get a proxy to the IOR Table using the PortableServer::POA::the_POAManager() function, which returns the POA Manager associated with the POA. Finally, we narrow the reference to the Table_var type. Package/library: The code uses the IORTable package/library.