Reputation: 7524
I have set jacorb properties in client code:
Properties props = new Properties();
props.setProperty("org.omg.CORBA.ORBClass", "org.jacorb.orb.ORB");
props.setProperty("org.omg.CORBA.ORBSingletonClass", "org.jacorb.orb.ORBSingleton");
props.setProperty("jacorb.retries", "2");
props.setProperty("jacorb.retry_interval", "2");
org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(args, props);
I also have naming service configured:
String ip = "....";
String port = "....";
String strNameService = "corbaloc::" + ip + ":" + port + "/NameService";
org.omg.CORBA.Object obj = orb.string_to_object(strNameService);
NamingContextExt ns = NamingContextExtHelper.narrow(obj);
But it seems there is still something missing, as I am not able to get POA reference:
org.omg.CORBA.Object rootPOAObj = orb.resolve_initial_references("RootPOA");
System.out.println("rootPOAObj:"+ rootPOAObj.toString());
POA rootPOA = (POA)POAHelper.narrow(rootPOAObj);
Then I learnt about OAAdress for jacrob properties(here, page 45).
So how is it different from the the ip, port configuration I have done for naming service?
Upvotes: 1
Views: 21