[omniORB] how to change nameservice server when client is run ning?

Raf.Vreys@mmr.be Raf.Vreys@mmr.be
Mon, 5 Mar 2001 12:48:22 +0100


Hi,

One possibility is to use the "string_to_object()" method:

meaning you replace the line:
CORBA::Object_var obj = my_orb->resolve_initial_references("Nameservice");
with:
CORBA::Object_var obj =
my_orb->string_to_object("corbaloc:iiop:10.10.0.2:5678/Nameservice");

see the omniorb documentation for URIs:
http://www.uk.research.att.com/omniORB/doc/3.0/omniORB/omniORB004.html

hope this will solve your problem,
greets,
Raf Vreys.


> -----Original Message-----
> From:	Victor Chen [SMTP:victorcd@163.net]
> Sent:	Monday, March 05, 2001 7:23 AM
> To:	omniorb-list@uk.research.att.com
> Subject:	[omniORB] how to change nameservice server when client is
> running?
> 
> Dear sir:
>     I start my client like this : 
>         "myclient ORBInitialHost 10.10.0.1 ORBInitialPort 5678" 
>     When the name service server is dead, How can I make my client program
> change to another name service server(10.10.0.2) without restart it?