[omniORB] connect to another NameService server?

David Hyde davidh@cavendish.co.uk
Thu, 28 Dec 2000 10:39:25 -0000


	  int argC = 5;
	  char *argV[5];
	  argV[0] = "myapp";
	  argV[1] = "-ORBInitRef";
	  argV[2] = "NameSvc1=iioploc://192.168.1.1:5678";
	  argV[3] = "-ORBInitRef";
	  argV[4] = "NameSvc2=iioploc://192.168.1.2:5678";

	then resolve_initial_references("NameSvc1") or
resolve_initial_references("NameSvc2") as many times as you want.

	Apologies if the syntax is not spot on as all of this is from memory
- I don't have my code to hand.

	Regards

	David Hyde



	-----Original Message-----
	From:	Victor Chen 
	Sent:	28 December 2000 08:51
	To:	omniorb-list@uk.research.att.com
	Subject:	[omniORB] connect to another NameService server?

	Dear sirs:
	 
	  int argC = 3;
	  char *argV[3];
	  argV[0] = "myapp";
	  argV[1] = "-ORBDefaultInitRef";
	  argV[2] = "iioploc://192.168.1.1:5678";

	and I use orb=CORBA::ORB_init(argC,argV,"omniORB3"); to init it.
	if the nameservice is dead, how can I change to nameservice on
another server 192.168.1.2 without restart myapp , CORBA::ORB_init () can
not run twice in one app,even I have executed orb->destroy();