Cisco Cisco Prime Optical 9.6 Developer's Guide
Cisco Prime Optical 9.6.3 GateWay/CORBA Programmer Reference Guide
OL-28047-01
749
"org.jacorb.orb.ORBSingleton"
// For Orbix
// sys_properties.put("org.omg.CORBA.ORBClass",
"com.iona.corba.art.artimpl.ORBImpl");
// sys_properties.put("org.omg.CORBA.ORBSingletonClass",
"com.iona.corba.art.artimpl.ORBSingleton");
// For Visibroker
// sys_properties.put("org.omg.CORBA.ORBClass",
"com.inprise.vbroker.orb.ORB"
// sys_properties.put("org.omg.CORBA.ORBSingletonClass",
"com.inprise.vbroker.orb.ORBSingleton"
// For other ORBs check the related ORB programming guide
// Step 1: Initialize the ORB and obtain ROOT POA reference
// Note: ORB_init will process any -ORB arguments
// be called before any other argument processing.
//
global_orb = ORB.init(args, null);
org.omg.CORBA.Object root_poa =
global_orb.resolve_initial_references("RootPOA");
global_orb.resolve_initial_references("RootPOA");
POA rpoa = POAHelper.narrow(root_poa);
POA poa = rpoa.create_POA("myPolicy",null, new Policy[0]);
poa.the_POAManager().activate();
}
catch (SystemException ex) {
// Exception handling
}
}
7.2.2.2 Get Reference to the Naming Service
// Get Nameservice reference
NamingContext nsRootContext = null;
try {
// Step 2: Get reference to the name service
// Option 1: Resolve initial reference (RIR)
// org.omg.CORBA.Object obj =
global_orb.resolve_initial_references("NameService");
global_orb.resolve_initial_references("NameService");