|
-
November 4th, 2009, 12:30 AM
#1
How to extract the server Host/IP from the CORBA IOR & NamingContextExt? [Java]
I've got a Client who needs to send a UDP packet to a server and the only reference he has to the Server is through the CORBA naming service (IOR). I know the IOR has the Server Information embedded but is there an easy way for me to extract it?
This is the code I have so far:
Code:
Object objRef = orb.resolve_initial_references("NameService");
NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef);
Object o = ncRef.resolve_str(Name);
After this Object o contains the IOR (if I do o.toString() it sure looks like a valid IOR), so from this what can I do to get the corresponding Servers IP/PORT so I can send it a UDP packet?
I know this sounds odd - why not just invoke the remote method, well this is for a school project and the professor recommended simply storing another table with all the sever information - but I am trying to be creative and since I was reading about the IOR I thought maybe I could do something with it ...
Any help would be much appreciated.
Thanks,
Last edited by Shaitan00; November 4th, 2009 at 12:46 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|