[omniORB] corbaloc/corbaname

Craig Rodrigues rodrigc@attbi.com
Thu, 21 Feb 2002 17:48:49 -0500


On Thu, Feb 21, 2002 at 03:34:13PM -0600, Donna Maskell wrote:
> I also wonder why the examples are so similar to web addresses, e.g.
> URLs. I realize URLs are valid URIs, but I have a very simple
> application here. I would like to get my objects by saying the

corbaloc/corbaname is a new syntax that was added recently
to the CORBA specification.  The intent was to use something
that looked like a URL, because the web as popularized this
type of syntax for locating resources across a network.

> string_to_object("corbaname::#MyObject");  // syntax probably
> incorrect, but you get the point.

The best thing to do is, download the CORBA specification,
and read section 13.6.10 "Object URLs":

http://www.omg.org/technology/documents/formal/corba_iiop.htm

Read up on the rir syntax for corbaloc and corbaname.  If you
use something like:

string_to_object("corbaname:rir:#MyObject");

This will get close to what you want.   When you start your program,
you could pass it a command-line argument:

myprog -ORBInitRef NameService=corbaloc:iiop:hostname.foo.com:2809/NameService

What this will do is, when your CORBA program calls ORB_init(), it
will put the initial reference for the Naming Service into
an internal table, based on the -ORBInitRef flag which you pass
in on the command-line.

The corbaname:rir:#MyObject syntax for an Object URL tells the ORB to:
     -> look for the Naming Service in the table of initial references
     -> Look for the object named MyObject in the root naming context.

It's a lot of magic, but once you figure it out, it works quite nicely.


> Also, for some reason, I cannot find the list, only the archives, so
> the only way I can interact is by sending a message to the list, rather
> than replying to someone's specific posting. Can anyone tell me where
> the group is? Thanks.

Information about how to subscribe to the mailing is provided here:
http://www.uk.research.att.com/omniORB/intouch.html

-- 
Craig Rodrigues        
http://www.gis.net/~craigr    
rodrigc@attbi.com