Get Name Service's IOR

Sai-Lai Lo S.Lo@orl.co.uk
22 Oct 1997 10:10:08 +0100


Richard Kilgore <rkilgore@lore.ece.utexas.edu> writes:

> 
> I'm brand new to CORBA.  I am trying to interpret the scant
> information I seem to be able to find, and have come to the
> conclusion that there is no way to determine a Naming service's
> IOR from within the CORBA model.  You actually have to rely on
> manual or some external method (probably involving networking) to
> update this value in omniORB.cfg (for unix) everytime the naming
> service is restarted?

1. Within your application,you can use CORBA::ORB::resolve_initial_reference() 
   to obtain the object reference to contact the Naming service. If you
   stringified this object reference you get the stringified IOR.

2. No, you do not need to update the value in omniORB.cfg everytime
   omniNames is restarted. The IOR will remain valid.

-- 
E-mail:         S.Lo@orl.co.uk          |       Olivetti & Oracle Research Lab
                                        |       24a Trumpington Street
Tel:            +44 223 343000          |       Cambridge CB2 1QA
Fax:            +44 223 313542          |       ENGLAND