14.2 usrconf.cfg (Option definition file for Java applications)

Organization of this section
(1) Format
(2) File storage location
(3) Functionality
(4) Specifiable keys
(5) Examples of coding
(6) JavaVM options that can be specified with add.jvm.arg
(7) Notes

(1) Format

Specify the key as follows:

key-name=value

Specification method
  • The string up to the linefeed is a value.
  • The line beginning with a hash mark (#) is a comment.
  • If you define a line without a value, the line is ignored.
  • You cannot add alphanumeric strings such as spaces and comments after the value. If you add such values, they will be considered as invalid.
(Example) key-name=value#comment
  • If you specify a path containing a space in the value, you need not enclose the path in double quotation marks (").
  • You cannot code with a character encoding that is different from the runtime character encoding.

(2) File storage location

#
This is the directory specified in the user definition file storage location environment variable (CJCLUSRCONFDIR). Always specify this environment variable before executing the cjclstartap command. For details on the environment variable settings required to execute EJB client applications, see 3.3.4 Environment variable settings required to execute EJB client applications in the manual uCosminexus Application Server EJB Container Functionality Guide.

(3) Functionality

This file specifies the invocation options of the JavaVM that executes the Java application when you use the cjclstartap command.

If you change the contents of this file while the Java application is running, the changes are applied only when the Java application is started next.

(4) Specifiable keys

The specifiable keys and default values are described below. When an invalid value is specified for this key, operation is not guaranteed.

Hint
The following contents are explained:
  • Overview of the keys that you can specify in the usrconf.cfg file for Java applications
    Of the keys that can be specified, those that are common with usrconf.cfg for J2EE servers are not explained in detail here.
    For details on the common keys, see 2.3 usrconf.cfg (Option definition file for J2EE servers). When referencing, substitute J2EE server for Java application.
    This subsection also explains the details of keys, if the specification contents and the keys for J2EE server differ greatly.
  • Differences with the keys for J2EE server (when the keys and specification contents of the usrconf.cfg file for J2EE server are different)
    This subsection explains the details about the keys when specifications for the Java application keys and the J2EE server keys are different. Note the differences in the Difference column.

Table 14-2 Keys and default values that you can specify in usrconf.cfg (Java application)

Key nameDifferenceContentsDefault value
add.jvm.argNoneThis key invokes JavaVM by using the specified option.
For details about JavaVM options that can be specified in add.jvm.arg, see 14.2(6)(a) JavaVM options that can be specified in the add.jvm.arg key of the Java application.
For details about default values, see 14.2(6)(b) Default values of the JavaVM options specified in the option definition file for Java applications.
add.class.pathExistsSpecify JAR for the container extension library.
Specify the class path (stubs.jar, numeric.jar, user class.jar) necessary for the execution of each EJB application.
If a path containing space is specified in the value, the path need not be enclosed with double quotation mark ("). Also, values specified in double quotations are not valid.
--
add.library.path#NoneSpecify the shared library for JNI--
cpp.library.versionNoneSpecify the version of libstdc++ library used in the process. Note that this key is used in Linux.
The following string can be specified:
6:
The libstdc++.so.6 library will be used. This key is invalid when specified on platforms other than Red Hat Enterprise Linux.
Only 6 can be specified with version 09-00 or later.
6
ejb.client.directory.shareableUniqueSpecify whether to simultaneously start multiple cjclstartap commands that use the same current directory or the same log output destination directory.
If you specify true:
Multiple commands are started at the same time.
If you specify false:
Multiple commands are not started at the same time.
true
ejb.client.ejb.logUniqueSpecify a value from 1 to 16 bytes for the name of the log output destination directory of the messages output by the Java application under the directory specified in the ejb.client.log.directory key.
You can specify single-byte alphanumeric characters, underscores (_), and hyphens (-).
If you specify a string that exceeds 16 bytes, the KDJE40051-W message is output.
If there are no access permissions for the directory and if you specify the file name, the KDJE40052-E message is output and the Java application terminates.
If you specify ejbserver.client.ejb.log in the user property file (usrconf.properties), the specification of the user property file is given priority at the following log file output destinations:
  • Operation log
  • Exception information in the case of failure
  • Maintenance information
system
ejb.client.log.appidUniqueSpecify a value from 1 to 16 bytes for the name of the log output destination subdirectory of the messages output by the Java application.
You can specify single-byte alphanumeric characters, underscores (_), and hyphens (-).
If you specify a string that exceeds 16 bytes, the KDJE40051-W message is output.
If there are no access permissions for the directory and if you specify the file name, the KDJE40052-E message is output and the Java application terminates.
If you specify ejbserver.client.log.appid in the user property file (usrconf.properties), the specification of the user property file is given priority at the following log file output destinations:
  • Operation log
  • Exception information in the case of failure
  • Maintenance information
ejbcl
ejb.client.log.directoryUniqueSpecify the log output destination path for the Java application in the range of 1 to 180 bytes.
Specify the path as an absolute path or as a relative path from the current directory.
You can specify single-byte alphanumeric characters, underscores (_), hyphens (-), and path separation characters.
If you specify a path exceeding 180 bytes (when the relative path is specified, the total of absolute path and relative path up to the current directory), the KDJE40059-W message is output and the default value is used. When the default value exceeds 180 bytes, log initialization fails and terminates abnormally.
In Windows, you cannot specify a path that includes a UNC name. In UNIX, you cannot specify a path of an nfs-mounted disk.
If there are no access permissions for the directory and if you specify the file name, the KDJE40052-E message is output and the Java application terminates.
If you specify ejbserver.client.log.directory in the user property file (usrconf.properties), the specification of the user property file is given priority at the following log file output destinations:
  • Operation log
  • Log operation log
  • Exception information in the case of failure
  • Maintenance information
Current-directory/logs
ejb.client.log.stdout.enabledUniqueSpecify whether to output messages in the standard output.
true:
Messages are output in the standard output.
false:
Messages are not output in the standard output.
Following are the logs in which messages output in the standard output can be controlled:
  • Operation log
  • cjclstartap command log
  • Standard output information of the invocation process
true
jvm.typeUniqueSpecify type of the JavaVM to be used. You can specify one of the following values:
  • client
    Java HotSpot Client VM is used.
  • server
    Java HotSpot Server VM is used.
If the specified value is wrong, JavaVM is searched in the "client" and "server" order. At this time, a message KDJE40020-W is output.
client

Legend:

Exists:
There is a difference in the keys of the usrconf.properties file for Java applications and the keys of the usrconf.properties file for J2EE servers. For details about keys, see the Contents column.
None:
This is a common key or default value in the usrconf.cfg file for Java applications and the usrconf.cfg file for J2EE servers. For details about keys, see 2.3 usrconf.cfg (Option definition file for J2EE servers).
Unique:
This is a key specific to usrconf.cfg file for Java applications. For details about keys, see the Contents column.
--:
This is a common default value in the usrconf.cfg file for Java applications and the usrconf.cfg file for J2EE servers. For details about the default value, see 2.3 usrconf.cfg (Option definition file for J2EE servers).
#
If both the add.library.path and OS environment variables (such as LIBPATH) are set up when executing the cjclstartap command, the add.library.path settings have a higher priority.

(5) Examples of coding

# EJB client application classpath
# RMI-IIOP Stubs jar file
add.class.path=Java-application-storage-path\stubs.jar

# RMI-IIOP interface jar file
add.class.path=Java-application-storage-path\1.jar

# User class
add.class.path=Java-application-storage-path\Java-application-jar
#add.class.path=user-classpath

# java vm options
add.jvm.arg=-Xms256m
add.jvm.arg=-Xmx512m

(6) JavaVM options that can be specified with add.jvm.arg

This section describes the JavaVM options that you can specify in add.jvm.arg and the default values for Java applications.

(a) JavaVM options that can be specified in the add.jvm.arg key of the Java application

This section describes the JavaVM options that you can specify in the add.jvm.arg key specified in the option definition file for Java applications. JavaVM options include the options that can be specified as per the standards and the JavaVM extension options. Also, the default values of JavaVM options depend on the server to be used. For details about JavaVM extension options, see 16.1 List of JavaVM extension options. For details about Java HotSpot VM options, see 16.5 Java HotSpot VM options that can be specified in Cosminexus.

The JavaVM options that you can specify in the add.jvm.arg key of the J2EE server are as follows:

(b) Default values of the JavaVM options specified in the option definition file for Java applications

This section describes the default values of JavaVM options for J2EE servers:

(7) Notes