|Oracle8i CORBA Developer's Guide and Reference
Release 3 (8.1.7)
Part Number A83722-01
Oracle8i provides universal resource locator (URL) syntax to access services and sessions. The URL lets you use JNDI requests to start up services and sessions, and also to access components published in the database instance. An example service URL is shown in Figure 4-1.
The service URL is composed of four components:
myPC-1. You can also use
localhostor the numeric form of the IP address for the host.
ORCL--or the service name--for example,
db_name.db_domainparameters defined in your database initialization file. If you use the service name within your service URL, the listener will load balance incoming requests across multiple database instances: that is, all database instances registered with the listener. This options is good when you are using parallel servers.
Always use colons to separate the hostname, port, and SID or service name.
When you make a connection to Oracle and look up a published object using JNDI, you use a URL that specifies the service (service name, host, port, and SID), as well as the name of a published object to look up and activate. For example, a complete URL could look like:
sess_iiop://localhost:2481:ORCL specifies the service name,
:default indicates the default session (when a session has already been established),
/projectAurora/Plans816 specifies a directory path in the namespace, and
getPlans is the name of a published object to look up.
Each component of the URL represents a Java class. For example, the service name is represented by a
ServiceCtx class instance, the session by a
SessionCtx instance. See "Using JNDI to Access Bound Objects" and "Session IIOP Service" starting for more information on the service and session names within the URL.
The JNDI bound name for the published object must use JNDI syntax rules. The underlying naming service that JServer JNDI uses is CosNaming. Thus, if your name includes a dot (".") in one of the names, the behavior diverges from normal CosNaming rules, as follows:
Normally, in retrieving a CosNaming object, you supply the id and kind as separate entities. The JServer implementation concatenates both id and kind. Thus, to retrieve the object, your application refers to the full name with the dot included as part of the JNDI name, rather than as a separator.