12.2.1 usrconf.cfg (Option definition file for Java applications)
- Organization of this subsection
(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
-
In Windows
user-definition-file-storage-directory#\usrconf.cfg
-
In UNIX
user-definition-file-storage-directory#/usrconf.cfg
- #
-
This is the directory specified in the user definition file storage location environment variable (CJCLUSRCONFDIR). If this environment variable is not set, the system references the current directory. 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.
- Tip
-
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.2.2 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.
-
Key name |
Difference |
Contents |
Default value |
---|---|---|---|
None |
This key invokes JavaVM by using the specified option. For details about the Java VM options that can be specified by using add.jvm.arg keys, see 14.1 List of JavaVM extension options and 14.5 Java HotSpot VM options that can be specified in Cosminexus. |
For details about default values, see 12.2.1(6) Default values of the JavaVM options specified in the option definition file for Java applications. |
|
Exists |
Specify a class path necessary for executing Java applications. 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. |
-- |
|
None |
Specify the shared library for JNI |
-- |
|
None |
Specify the version of libstdc++ library used in the process. Note that this key is used in Linux. The following string can be specified:
Only 6 can be specified with version 09-00 or later. |
6 |
|
Unique |
Specify whether to simultaneously start multiple cjclstartap commands that use the same current directory or the same log output destination directory.
|
true |
|
Unique |
Specify 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:
|
system |
|
Unique |
Specify 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:
|
ejbcl |
|
Unique |
Specify 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:
|
Current-directory/logs |
|
Unique |
Specify a parameter that acts on the exclusive processing for the following log files:
The function of the parameter that acts on exclusive processing differs depending on whether the OS is UNIX or Windows.
For example, this key is used in the following case: Multiple instances of the cjclstartap command that started concurrently in the subdirectory common mode failed in exclusive processing for a log file, outputting the KDJE40016-E (with errno 22), KDJE30043-E, or KDJE40052-E message to the standard error output. |
30 |
|
Unique |
Specify a parameter that acts on the exclusive processing for the following log files:
The function of the parameter that acts on exclusive processing differs depending on whether the OS is UNIX or Windows.
For example, this key is used in the following case: Multiple instances of the cjclstartap command that started concurrently in the subdirectory common mode failed in exclusive processing for a log file, outputting the KDJE40016-E (with errno 22), KDJE30043-E, or KDJE40052-E message to the standard error output. |
100 |
|
Unique |
Specify whether to output messages in the standard output.
Following are the logs in which messages output in the standard output can be controlled:
|
true |
|
Unique |
Specify type of the JavaVM to be used. You can specify one of the following values:
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.2.2 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.2.2 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) Default values of the JavaVM options specified in the option definition file for Java applications
The following are the default values of the Java VM options specified in the option definition file for Java applications:
-
-XX:HitachiJavaLog:ejb.client.log.directory\ejb.client.ejb.log\ejb.client.log.appid
-
-XX:+HitachiOutOfMemoryStackTrace
-
-XX:-HitachiThreadDumpToStdout
-
-XX:+HitachiOutOfMemoryAbort
-
-XX:+HitachiJavaClassLibTrace
-
-XX:+HitachiLocalsInStackTrace
-
-XX:HitachiJavaClassLibTraceLineSize=1024
-
-XX:+HitachiLocalsSimpleFormat
-
-XX:+HitachiTrueTypeInLocals
-
-XX:+HitachiLocalsInStackTrace
-
-XX:+HitachiVerboseGC
-
-XX:+HitachiVerboseGCPrintCause
-
-XX:+HitachiOutputMilliTime
(7) Notes
-
Do not use a character encoding that is different from the OS locale. If UTF-8 is used in the OS locale, do not use UTF-8 with BOM.
-
If you specify the same key in the usrconf.properties file and in -D of add.jvm.arg of the usrconf.cfg file, the value specified in usrconf.properties is given priority.
-
Among the values specified in the add.class.path key, there are some values for which the <cosminexus.home> tag is used to specify the JAR files for the container extension library. These values indicate the installation destination of Application Server, so you do not need to change the contents coded for the add.class.path key. Note that when you add the container extension library to the add.class.path key, the installation and uninstallation operations might not be guaranteed; therefore, do not use the <cosminexus.home> tag.
-
The following properties cannot be specified for the -D option:
java.endorsed.dirs
java.security.policy
java.class.path
java.library.path
-
For Java applications that use the Java EE functionality, do not specify the --add-modules and --module-path options for the add.jvm.arg key. If you do so, operations are not guaranteed.
-
For Java applications that do not use the Java EE functionality, you can use a modularized library by specifying the --add-modules and --module-path options for the add.jvm.arg key.