Differences between JNDI and CORBA

WAS contains support for Common Object Request Broker Architecture (CORBA) object URLs (corbaloc and corbname) as JNDI provider URLs and lookup names. Issues can exist when mapping JNDI name strings to and from CORBA names.

CORBA names
Each component in a CORBA name consists of an id and kind field.

JNDI names
JNDI name components do not consist of an id and kind field. Each component in a JNDI name is atomic. Typical JNDI clients do not need to make a distinction between the id and kind fields of a name component, or know how JNDI name strings map to CORBA names.

When a name is parsed according to JNDI syntax, each name component is mapped to the id field of the corresponding CORBA name component. The kind field always has an empty value. This basic syntax is the least obtrusive to the JNDI client in that it has the fewest special characters. However, you cannot represent with this syntax a CORBA name with a non-empty kind field. This restriction can prevent EJB applications from interoperating with CORBA applications.

INS name syntax

Some clients, however must interoperate with CORBA applications that use CORBA names with non-empty kind fields. These JNDI clients must make a distinction between id and kind so that JNDI names are correctly mapped to CORBA names, particularly when the CORBA names contain components with non-null kind fields. Such JNDI clients can use the INS name syntax.

The INS syntax allows a JNDI client to make the proper mapping to and from a CORBA name. INS syntax is very similar to the JNDI syntax with the additional special character, dot (.). Dots are used to delimit the id and kind fields in a name component. A dot is interpreted literally when it is escaped. Only one unescaped dot is allowed in a name component. A name component with a non-empty id field and empty kind field is represented with only the id field value and must not end with an unescaped dot. An empty name component (empty id and empty kind field) is represented with a single unescaped dot. An empty string is not a valid name component representation.

Use of this syntax is not recommended unless it is necessary, because this syntax is more restrictive from the JNDI client's perspective in that the JNDI client must be aware that name components with multiple unescaped dots are syntactically invalid. INS name syntax is part of the OMG CosNaming Interoperable Naming Specification.

For an example of the INS name syntax for use with JNDI clients, see Example: Set the syntax used to parse name strings.