2.6.7 Execution environment settings

To use the user-specified name space functionality, you must customize the server management commands and set up the J2EE applications.

Organization of this subsection
(1) Customizing the server management commands
(2) Setting up the J2EE applications

(1) Customizing the server management commands

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

ItemsSpecified keysSettings
Assigning the optional names to the EJB home object references (User-specified name space functionality)ejbserver.cui.optionalname.enabledSpecifies 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.enabledSpecifies 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.


(2) Setting up the J2EE applications

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.

(a) Setting the optional names for the Enterprise Beans

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>
<display-name>MyAdder</display-name>
<session-type>Stateful</session-type>
<transaction-type>Container</transaction-type>
<runtime>
<lookup-name>MyAdder</lookup-name>
<optional-name>user/Adder</optional-name>
<local-optional-name>user/localAdder</local-optional-name>
<maximum-sessions>0</maximum-sessions>
<stateful>
<maximum-active-sessions>0</maximum-active-sessions>
<inactivity-timeout>0</inactivity-timeout>
<removal-timeout>0</removal-timeout>

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.

(b) Setting the optional names for the J2EE resources

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 adaptersCommandsProperty fileSpecified tags
Resource adaptercjsetrarprop commandConnector property file<resource-external-property> - <optional-name> tag
Mail configurationcjsetresprop commandMail property file
JavaBeans resourcecjsetjbprop commandJavaBeans 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>
<description></description>
<display-name>DB_Connector_for_Oracle</display-name>
<icon />
<vendor-name>Hitachi, Ltd.</vendor-name>
:
<connector-runtime>
<resource-external-property>
<description></description>
<optional-name>jdbc/TestDB1</optional-name>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-external-property>
</connector-runtime>
</hitachi-connector-property>

In this example, "jdbc/TestDB1" is set as the optional name for DB Connector.