Do the name service and the client have to run on the same machine? ..........
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Paolo_montevecchi
Posted On:   Wednesday, May 15, 2002 09:06 AM

Do the name service and the client have to run on the same machine? If they can run on different machines, how can the client contact the name service?

Do the name service and the client have to run on the same machine? If they can run on different machines, how can the client contact the name service?



I use Visibroker 4.0 for Java, i would like to know how my client can contact the name service.


Thanks alot

Paolo Montevecchi

Re: Do the name service and the client have to run on the same machine? ..........

Posted By:   Chockalingam_Anbalagan  
Posted On:   Wednesday, July 3, 2002 08:36 AM

 Following segment will connect to NameService.


org.omg.CORBA.ORB orb =org.omg.CORBA.ORB.init(args,null);

org.omg.CORBA.Object rootObj = orb.resolve_initial_references("NameService");

NamingContextExt root = NamingContextExtHelper.narrow(rootObj);

org.omg.CORBA.Object yourObject = ((NamingContext)root).resolve(root.to_name("yourObjectId"));


If you are using URL Naming, the you must specify the url in your command prompt


-Dvbroker.agent.enableLocator=false
-DORBInitRef=NameService=iioploc://:/NameService

Re: Do the name service and the client have to run on the same machine? ..........

Posted By:   Mike_Friedrich  
Posted On:   Thursday, May 16, 2002 01:28 AM

Hi, the name service can run on another maschine. You can not say your client directly where the nameservice is.

I think, the problem is known as "bootstrapping"-problem.


The correct way to resolve is using

orb->resolve_initial_references("NameService").


Now you have to "configure" your CORBA-implementation. May be there are system properties or a config file. This is not clearly specified by the corba-standard and may differ from vendor to vendor. And for Visibroker i dont know the right way.

About | Sitemap | Contact