2.6.2 Rules for assigning the optional names

This subsection describes the rules for assigning the optional names to Enterprise Beans and J2EE resources.

Organization of this subsection
(1) Specifiable names
(2) Duplication of optional names

(1) Specifiable names

This subsection describes the characters that can be specified as the optional name and the specification constraints.

(a) Characters that can be specified in an optional name

You can specify a name containing the following characters as an optional name:

However, you can use the forward slash (/) in the name only when the forward slash is used as a delimiter.

(b) Constraints on optional name specification

You cannot specify the following names as optional names. If you specify the following names, the J2EE applications or J2EE resources cannot be started:

Apart from the above, for the J2EE resources, the definition specified later becomes valid when the same name is specified.

(2) Duplication of optional names

The following table describes whether the duplication of the optional name is allowed when the optional names are assigned to Enterprise Beans and J2EE resources.

Table 2-24 Duplication of the optional names for Enterprise Beans and J2EE resources

Target for assigning the optional nameEnterprise Beans with remote interfaceEnterprise Beans with local interfaceResource adapters included in the J2EE applicationJ2EE resources #1
Enterprise Beans with remote interfaceNY#2NN
Enterprise Beans with local interfaceY#2CCN
Resource adapters included in the J2EE applicationNCCN
J2EE resources #1NNNN
Legend:
Y: Can be duplicated
C: Can be duplicated if the J2EE application is different
N: Cannot be duplicated

#1 Excluding the resource adapters included in the J2EE application.

#2 Can be duplicated regardless of whether the local call optimization functionality is used.


Note that for the combinations in which the optional names cannot be duplicated, the specification of the optional name might be disallowed even if the name does not match completely.

This is described with the following example:

Example
The naming management functionality manages the objects registered in the CORBA Naming Service by names. The name assigned to the object analyzes the forward slash (/) as a delimiter of the hierarchical structure and is managed in a tree structure. In the tree structure, you can register a new object below the nodes that have child nodes.
In the following figure, nodes A, B, C, and F have child nodes. Therefore, new objects can be registered below these nodes.

Figure 2-7 Example wherein the optional name cannot be specified although the name does not match completely

[Figure]
In such a case, if the optional name 'A/B/D' is already in use, you can specify the optional name 'A/B/I'.
However, new objects cannot be registered in nodes such as D, E, G, and H. Therefore, the optional name 'A/B/D/I' cannot be specified.

If an optional name that cannot be duplicated is specified, an error occurs at the following timings in each object where the optional name is specified: