[omniORB] Connecting to a OmniORB server

Gary Duzan gduzan@bbn.com
Thu May 30 17:50:04 2002


In Message <20020530085548.GA19063@aqs-carcontrol.be> ,
   aderuwe@aqs-carcontrol.be (Alexander Deruwe) wrote:

=>Hewwo all,
=>
=>[I'm going to ask a pretty basic question I think, but I have not been
=>able to find clear enough documentation or examples on the matter.
=>Please point me to the right documentation if I missed it.]
=>
=>I'm creating a CORBA server that maps database tables to objects so the
=>client program doesn't need to do database stuff. I've been coding and
=>testing for a few weeks on localhost, so I do stuff like this for
=>connecting to the server:
=>
=>nameservice_obj = orb.resolve_initial_references("NameService")
=>
=>How would I code this for a remote server? I've tried (from
=>http://omniorb.sourceforge.net/omni30/omniORB/omniORB004.html):
=>
=>nameservice_obj = orb.resolve_initial_references("corbaloc:rir:/NameService")
=>and
=>nameservice_obj =vorb.resolve_initial_references("corbaname::192.168.0.1")
=>
=>but they both seem to free the nameserver (i.e. falling back to the
=>localhost way fails after this too and I have to restart the nameserver)

   Well, it depends. If you have set up your omniorb.cfg (or -ORBInitRef
on the command line, or other configuration trick) to point at a
remote name service, you can use the same command as before, the
first one. The other two will almost work, too, but for corbaloc
and corbaname URLs/IORs you need to use orb.string_to_object(), not
orb.resolve_initial_references(). You can also use those URLs in the
rir configuration. Check section 4.2 of the omniORB User's Guide for
details.

					Gary Duzan
					BBN Technologies
					A Verizon Company