[omniORB] corbaloc/corbaname
Richard Hardgrave
richard.hardgrave@teradyne.com
Thu, 21 Feb 2002 15:55:30 -0600 (CST)
> From owner-omniorb-list@uk.research.att.com Thu Feb 21 15:38 CST 2002
> Date: Thu, 21 Feb 2002 15:34:13 -0600
> From: "Donna Maskell" <Donna.Maskell@udlp.com>
> To: <omniorb-list@uk.research.att.com>
> Subject: [omniORB] corbaloc/corbaname
> Mime-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Content-Disposition: inline
> X-Loop: omniorb-list@uk.research.att.com
>
> I successfully ran the echo tests by cutting and pasting the IOR from
> the server to the client. However, now I have been trying to get working
> an application which is a client to multiple servers on an ORB. The IOR
> is unwieldy and it seems like the INS offers a better way.
>
> The corbaname thing seems the better choice (than corbaloc), since it
> doesn't require me to keep track of where the object is, but I still
> have to specify the location of the Name Service, do I not? Seems to me
Not quite sure what you're after, here. Are you wanting the
hostname where the Naming Service is running to be 'transparent'?
I guess you could the following with every host on the network,
until you find it ... ;-)
corbaloc is as you describe:
it refers to an object on a specific host and port, with the given
object key. With corbaname, on the other hand, you give the host and
port of the naming service (or just the host if it's listening on the
default port), and the name of the object to look up. Perhaps this is
illuminating:
$ eg3_impl &
$ eg2_clt corbaname::nameservice.host.name#test.my_context/Echo.Object
Or, alternatively,
$ eg2_clt corbaname:rir:#test.my_context/Echo.Object
which uses the name service returned by resolve_initial_references.
(credits -> Duncan Grisby)
Richard
> that the same processing I do to get the name service could be done by
> the string_to_object method. That does assume it can tell whether a Name
> Service is specified or not, but if the URI starts with "corbaname", it
> knows to look for one. I suppose there might be backward-compatibility
> problems if string_to_object started looking up a name service. But
> suppose you passed it a string of the form:
>
> corbaname::#some_context#some_name
>
> Perhaps the "::" followed by a "#" could be used to trigger it to look
> up the NameService itself. Or is there some reason why it cannot do
> that?
>
> 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
> equivalent of:
>
> string_to_object("corbaname::#MyObject"); // syntax probably
> incorrect, but you get the point.
>
> Could it not be set up to default to looking up the naming service,
> then defaulting to the root context if there is only one '#'? As it is,
> I can see myself writing a method to encapsulate this whole thing so
> that I invoke:
>
> CORBA::Object_var = get_object("MyObject");
>
> and everything else is handled internally to get_object. Or is this not
> a feasible approach for some reason? I have been reading and studying
> the 3.0 User's Guide, but I won't say I have it completely assimilated
> as yet.
>
> 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.
>
> Donna
>
>