Get Name Service's IOR

Nalin Stefano 308885/IF tikki@dei.unipd.it
Wed, 22 Oct 1997 09:58:35 +0200 (MET DST)


Hi,

On Tue, 21 Oct 1997, Richard Kilgore wrote:

> 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?

Just look at the eg3 example (client or server):

CORBA::Object_var initServ;
initServ = orb->resolve_initial_references("NameService");

actually initServ is the IOR of the Naming Service. You can stringify it
and store it in the file reacheble via a URL connection.
Ofcourse this file must be updated everytime the Naming Service is
restarted.

Best regards,
Stefano