[omniORB] How to determine the name of the naming service ? Is this correct ??

Brian Neal bgneal at gmail.com
Fri Dec 16 08:42:54 GMT 2011


2011/12/15 Rajesh Khan <rajeshkhan808 at gmail.com>:
> I am trying to run the example 3 of omniorb which uses the naming service.
> Unfortunately when the server from code eg3_impl starts up I get
> Service required is invalid [does not exist]
>
> I think the issue is that i have not specified the correct service name
> here:
>                  obj =
> orb->resolve_initial_references("corbaname::Jacks-PC");
> I did start the naming service using Omninames.exe -start and here is what i
> got. (I have attached the pic). I think the service is running but i dont
> know what to place in the resolve_initial_references reference parameter.
>
> I followed the resgistry section also and here how my registry is configured
> Value name : 1
> Value Data  : NameService=corbaname::Jacks-PC
>
> I would appreciate any suggestions on this matter thanks...
>

Well there are probably a lot of ways to do this. But I typically do:

obj = orb->resolve_initial_references("NameService");

And then in my omniORB.cfg file I have

InitRef = NameService=corbaname::172.17.158.100

(your IP address / hostname will vary of course)

Hope that helps,
BN



More information about the omniORB-list mailing list