35 int main(
int argc,
char* argv[]) {
38 orb = CORBA::ORB_init(argc, argv);
42 CORBA::Object_var poaObj = orb -> resolve_initial_references(
"RootPOA");
43 PortableServer::POA_var rootPOA = PortableServer::POA::_narrow(poaObj);
48 PortableServer::POAManager_var
manager = rootPOA -> the_POAManager();
53 ns = orb -> resolve_initial_references(
"NameService");
54 }
catch (
const CORBA_ORB::InvalidName&) {
55 cerr << argv[0] <<
": can't resolve `NameService'" << endl;
60 <<
": `NameService' is a nil object reference" 69 <<
": `NameService' is not a NamingContext object reference" 76 cdFactory = cdFactoryImpl -> _this();
81 rootnc -> rebind(nc, cdFactory);
84 manager -> activate();
85 cout <<
"ready" << endl;
89 cerr << ex._rep_id() << endl;
int main(int argc, char *argv[])
#define CORBA_SystemException
#define CosNaming_NamingContext_var