To use the user-specified name space functionality, you must customize the server management commands and set up the J2EE applications.
You can customize the settings for operating the server management commands. This subsection describes the settings for the user-specified name space functionality used by the server management commands.
You customize the server management commands using usrconf.properties (system property file for the server management commands). The following table describes the settings.
Table 2-28 Customizing the server management commands for using the user-specified name space functionality
Items | Specified keys | Settings |
---|---|---|
Assigning the optional names to the EJB home object references (User-specified name space functionality) | ejbserver.cui.optionalname.enabled | Specifies whether to set up the optional names for the EJB home objects. Also, for assigning an optional name to an EJB home object, in addition to specifying this key, you must also specify the optional name# for the EJB home object. |
Assigning the optional names to the J2EE resources (User-specified name space functionality) | ejbserver.cui.optionalname.enabled | Specifies whether to set up the optional names for the J2EE resources. Also, for assigning an optional name to a J2EE resource, in addition to specifying this key, you must also specify the optional name# for the J2EE resource. |
#: You specify an optional name, when you define the J2EE application properties by using the server management commands. For details about referencing and changing the name registered in the JNDI name space, see 9.13 Referencing and changing the names registered in the JNDI name space in the uCosminexus Application Server Application Setup Guide.
You implement the J2EE application settings in the execution environment using the server management commands and property files. This subsection describes the settings for specifying the optional name for the Enterprise Beans and J2EE resources separately. Note that the tags described here correspond to cosminexus.xml. For details about the definitions in cosminexus.xml, see 2.6.5 Setting the optional names for the Enterprise Beans or 2.6.6 Setting the optional names for the J2EE resources.
To set up an optional name for an Enterprise Bean, use the Session Bean property file or Entity Bean property file. The tag names differ depending on the interface type. The property files and tags used for each interface type are as follows:
An example of specification of an optional name in a property file is as follows. In this example, the SessionBean property file is used to set up an optional name for the Stateful Session Beans.
<hitachi-session-bean-property> |
In this example, "user/Adder" is set as the optional name for the remote interface and "user/localAdder" is set up as the optional name for the local interface.
To set up an optional name for a J2EE resource, specify the name as an attribute of the DB Connector, mail configuration, or JavaBeans resource. The commands and property files used in the settings differ for each resource type. The following table lists the resource types and the commands and property files for setting the optional names.
Table 2-29 Resource types and the commands and property files for setting the optional names
Types of resource adapters | Commands | Property file | Specified tags |
---|---|---|---|
Resource adapter | cjsetrarprop command | Connector property file | <resource-external-property> - <optional-name> tag |
Mail configuration | cjsetresprop command | Mail property file | |
JavaBeans resource | cjsetjbprop command | JavaBeans resource property file | <resource-env-external-property> - <optional-name> tag |
Note: You cannot set up the optional names for the mail configuration and JavaBeans resources in cosminexus.xml. You specify the optional name in a property file.
The following is an example of specification of an optional name in a property file. In this example, the Connector property file is used to set up the optional name for the resource adapters.
<hitachi-connector-property> |
In this example, "jdbc/TestDB1" is set as the optional name for DB Connector.