4.6.5.3 corbaname URL Scheme
The corbaname URL scheme extends the capabilities of the corbaloc scheme to allow URLs to denote entries in a Naming Service. Resolving corbaname URLs does not require a Naming Service implementation in the ORB core. An example of a corbaname URL is:
corbaname:555objs.com#a/string/path/to/obj
This URL specifies that at host 555objs.com
, an
object of type NamingContext (with an object key of
NamingService) can be found, or alternatively, that an agent
running at that location will return a reference to a
NamingContext. The stringified name
a/string/path/to/obj
is then used as the argument to
the resolve
operation on that NamingContext.
A corbaname URL is similar to a corbaloc URL except that a
corbaname URL also contains a stringified name that identifies a
binding in a naming context. The #
character denotes
the start of the stringified name.
The BNF syntax for the URL is listed in the following table.
Table 4-10 BNF Syntax for URL
URL Element | Format | Description |
---|---|---|
<corbaname>
|
|
corbaloc_obj is a portion of a corbaname URL that
identifies the naming context. The syntax is identical to its use
in a corbaloc URL.
|
<corbaloc_obj>
|
<obj_addr_list>[“/”<key_string>]
|
For a description of obj_addr_list , see Table
4-9.
|
<obj_addr_list>
|
As defined in a corbaloc URL | For a description of obj_addr_list , see Table
4-9.
|
<key_string>
|
As defined in a corbaloc URL | For a description of key_string , see Table
4-9.
|
<string_name>
|
Stringified Name | empty string
|
For a description of string_name , see Table
4-9.
|
Resolution of a corbaname URL is implemented as a simple extension to corbaloc URL processing. To illustrate the implementation, we will use the following corbaname URL:
corbaname:<corbaloc_obj>[“#”<string_name>]
The resolution process is as follows:
- Construct a corbaloc URL of the form
corbaloc::<corbaloc_obj>
from the corbaname URL. - Convert the corbaloc URL to a naming context object reference
by calling
CORBA::ORB::string_to_object
to obtain aCosNaming::NamingContext
object. - Convert
<string_name>
to aCosNaming::Name.
- Invoke the resolve operation on the
CosNaming::NamingContext
, passing theCosNaming::Name
constructed. - The object reference returned from
CosNaming::NamingContext::resolve
should be returned to the caller.
By following this resolution process, you eliminate the
possibility of returning an object reference for a naming context
that does not exist in the Naming Service. One side effect of this
approach is that it requires that stubs for the Naming Service be
part of the ORB core or that there be an internal mechanism for
sending the request for the resolve
operation. Because
of the complexity, it is recommended that stubs for the Naming
Service be embedded within the ORB core.
Parent topic: INS Object URL Schemes