Do the name service and the server have to run on the same machine? If they can run on different machines, how can the server contact the name service?
Created May 4, 2012
Bruce Martin This is the "bootstrapping" problem. CORBA provides location transparent object references and a typical way of getting an object reference is from the name service, but then how does one find the name service?
Different ORBs support different mechanisms.
To do this in the Java 2 ORB, set these parameters:
-ORBInitialHost -ORBInitialPortand then start the name service:
tnameserv -ORBInitialPort tnameservportStart your CORBA server on the different machine:
java yourCORBAServer -ORBInitialHost tnameservhost -ORBInitialPort tnameservport
ORBIX and VisiBroker provide agents that will locate objects for you according to some policy. Thus you can simply call
bindto locate the name service.
Alternatively, to accomplish this in a portable fashion, you can pass the stringified IOR of the name service to the client program. The client program "destringifies" the object reference and uses it to talk to the name service. This will work with any CORBA compliant ORB and name service.