2.2.2 usrconf.cfg (Option definition file for J2EE servers)
- Organization of this subsection
(1) Format
Specify the key as follows:
key-name=value
- How to specify:
-
-
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
-
You cannot code with a character encoding that is different from the runtime character encoding.
-
(2) File storage location
-
In Windows
Cosminexus-installation-directory\CC\server\usrconf\ejb\server-name\
-
In UNIX
/opt/Cosminexus/CC/server/usrconf/ejb/server-name/
(3) Functionality
Specify the invocation options of the JavaVM that execute the J2EE servers.
If you change the contents of this file while the J2EE server is running, the changes become effective only when the J2EE server is started next.
(4) Specifiable keys
The following table describes the specifiable keys and the default values: VR is the version of Application Server on which parameters are introduced or changed.
Key name |
Contents |
Default |
VR |
---|---|---|---|
This key invokes JavaVM by using the specified option. If you want to specify the system properties, do not use the -D option, but specify the properties in the usrconf.properties file. When specifying multiple options, use the same key name and specify multiple times as follows: (Example of specification) add.jvm.arg= -Xms256m add.jvm.arg= -Xmx512m You cannot specify multiple options as shown in the following example. If you specify the options as shown below, the initialization of JavaVM will fail. (Example of specification) add.jvm.arg=-Xms256m -Xmx512m 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 2.2.2(5) Default values of the JavaVM options in J2EE servers. |
-- |
|
Specify the class path for a container extension library. 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 only when the container extension library uses 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. This key will be invalid when specified on platforms other than Red Hat Enterprise Linux. |
6 |
-- |
|
Start a J2EE server using the specified directory as the working directory of J2EE server. The current directory of J2EE server is as follows:
Specify an absolute path for the directory name. The characters that you can specify include, single-byte alphanumeric characters, underscores (_), or hyphens (-). You can specify the path length in the range calculated using the estimation formula of the Application Server working directory. For details on the work directory of J2EE servers, see Appendix C.1 Work directory of the J2EE server in the uCosminexus Application Server System Setup and Operation Guide. |
|
-- |
|
Specify an integer value from 0 to 16 for the number of core files that remain when a J2EE server is restarted. Note that this key is used for UNIX. Among the following target core files, the specified number of files, starting from the one with the latest creation time, is left behind and all the other files are deleted. Generally, specify 1 as the number of core files output when a J2EE server is down.
Among the target core files, those core files that may be overwritten or deleted during restart, are renamed.
The format of core-file-creation-date-and-time is yymmddHHMMSS. When the process of renaming or deleting a core file fails, a message KDJE40047-E is output, the process of starting the J2EE server is cancelled and terminates abnormally. Note the following:
|
1 |
-- |
|
Use the specified directory as the output destination of the log file#2. Specify the path length from 1 to 200 bytes. In Windows, you cannot specify a path that includes a UNC name. In UNIX, you cannot specify a path of an nfs-mounted disk. When specifying this key, create a directory to output log before starting the server. If you specify a directory that does not exist, the message KDJE40024-E is output when the J2EE server starts up, and then the server is terminated abnormally. Make sure that the specified log data output-destination directory is not shared with other J2EE servers, Web container servers (compatibility functionality), batch servers, or Cosminexus Manager. If you specify the same directory, the operation will not produce the desired results. Note that if you specify this key and output the log to a directory other than the working directory, the log files in the change destination directory are not deleted when you uninstall the server. If you want to delete the log files, delete them manually. |
|
-- |
|
Specify an integer from 4096 to 2147483647 (unit: byte) as the upper-limit for the size of the cjstdout.log file. |
1048576 |
-- |
|
Specify an integer from 4096 to 2147483647 (unit: byte) as the upper-limit for the size of the cjstderr.log file. |
1048576 |
-- |
|
Specify the type of JavaVM to be used. You can specify one of the following values:
In a development environment where the J2EE servers or the J2EE applications start and stop frequently, performance may be improved by specifying "client". In the case of an error in the specified value, the key searches for JavaVM in the order of "server" -> "client". At this time, the message KDJE40020-W is output. |
server |
-- |
Types of log |
Contents |
Log collection directory and log file names |
---|---|---|
Message log |
Operation log |
|
Log operation log |
|
|
User log |
Web servlet log |
|
User output log |
|
|
User error log |
|
|
JavaVM maintenance information and GC log |
|
|
Event log |
Event log for the Explicitly Memory Management functionality of JavaVM |
|
Exception log |
Exception information in the case of failure |
|
Maintenance log of resource adapter |
-- |
|
TPBroker trace |
Trace information of TPBroker |
|
(5) Default values of the JavaVM options in J2EE servers
The following are the default values of the Java VM options for J2EE servers:
(a) When using V9 compatibility mode
-
-Xms256m
-
-Xmx512m
-
-XX:MetaspaceSize=128m
-
-XX:MaxMetaspaceSize=128m
-
-XX:SurvivorRatio=8
-
-XX:HitachiJavaLog:<ejb.server.log.directory>
-
-XX:HitachiJavaLogFileSize=4m
-
-XX:+HitachiOutOfMemoryStackTrace
-
-XX:-HitachiThreadDumpToStdout
-
-XX:+HitachiOutOfMemoryAbort
-
-XX:+HitachiJavaClassLibTrace
-
-XX:HitachiJavaClassLibTraceLineSize=1024
-
-XX:+HitachiLocalsSimpleFormat
-
-XX:+HitachiTrueTypeInLocals
-
-XX:+HitachiLocalsInStackTrace
-
-XX:+HitachiVerboseGC
-
-XX:+HitachiVerboseGCPrintCause
-
-XX:+HitachiOutputMilliTime
-
-XX:+HitachiUseExplicitMemory
-
-XX:HitachiExplicitHeapMaxSize=64m
-
-XX:HitachiExplicitMemoryLogLevel:normal
-
-XX:HitachiExplicitMemoryJavaLog:<ejb.server.log.directory>
-
-XX:HitachiExplicitMemoryJavaLogFileSize=4m
-
-XX:-HitachiAutoExplicitMemory
-
-XX:+HitachiExplicitMemoryAutoReclaim
-
-XX:-HitachiExplicitMemoryCompatibleToV8
-
-XX:+HitachiOutOfMemoryHandling
(b) When using recommended mode
-
-Xms256m
-
-Xmx512m
-
-XX:MetaspaceSize=128m
-
-XX:MaxMetaspaceSize=128m
-
-XX:SurvivorRatio=8
-
-XX:HitachiJavaLog:<ejb.server.log.directory>
-
-XX:HitachiJavaLogFileSize=4m
-
-XX:+HitachiOutOfMemoryStackTrace
-
-XX:-HitachiThreadDumpToStdout
-
-XX:+HitachiOutOfMemoryAbort
-
-XX:+HitachiJavaClassLibTrace
-
-XX:HitachiJavaClassLibTraceLineSize=1024
-
-XX:+HitachiLocalsSimpleFormat
-
-XX:+HitachiTrueTypeInLocals
-
-XX:+HitachiLocalsInStackTrace
-
-XX:+HitachiVerboseGC
-
-XX:+HitachiVerboseGCPrintCause
-
-XX:+HitachiOutputMilliTime
-
-XX:+HitachiUseExplicitMemory
-
-XX:HitachiExplicitHeapMaxSize=64m
-
-XX:HitachiExplicitMemoryLogLevel:normal
-
-XX:HitachiExplicitMemoryJavaLog:<ejb.server.log.directory>
-
-XX:HitachiExplicitMemoryJavaLogFileSize=4m
-
-XX:-HitachiAutoExplicitMemory
-
-XX:+HitachiExplicitMemoryAutoReclaim
-
-XX:-HitachiExplicitMemoryCompatibleToV8
-
-XX:+HitachiOutOfMemoryHandling
-
-XX:ReservedCodeCacheSize=240M
(6) Examples of coding
-
In Windows
# java vm options add.jvm.arg=-Xms256m add.jvm.arg=-Xmx512m add.jvm.arg=-XX:MetaspaceSize=128m add.jvm.arg=-XX:MaxMetaspaceSize=128m add.jvm.arg=-XX:+HitachiVerboseGC add.jvm.arg=-XX:HitachiVerboseGCIntervalTime=600 # ejb public directory ejb.public.directory=c:\workdir # ejb.server.log.directory ejb.server.log.directory=c:\logdir\servername
-
In UNIX
# java vm options add.jvm.arg=-Xms256m add.jvm.arg=-Xmx512m add.jvm.arg=-XX:MetaspaceSize=128m add.jvm.arg=-XX:MaxMetaspaceSize=128m add.jvm.arg=-XX:+HitachiVerboseGC add.jvm.arg=-XX:HitachiVerboseGCIntervalTime=600 # ejb public directory ejb.public.directory=/opt/workdir # ejb.server.log.directory ejb.server.log.directory=/CClogs/server/servername # ejb.server.corefilenum ejb.server.corefilenum=3
(7) Notes
-
The environment variable CLASSPATH that is set at the command prompt is not passed to the J2EE servers, but the other environment variables (such as PATH) are passed.
-
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.
-
The JavaVM options that are not specified in the usrconf.cfg become the default JavaVM values.
-
You cannot specify the following properties for -D:
-
java.endorsed.dirs
-
java.security.policy
-
java.class.path
-
java.library.path
-
java.locale.providers
-
-
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.
-
For the add.jvm.arg key, do not specify the --add-modules or --module-path option. If you do so, operations are not guaranteed.
-
Specify the -XX:SoftRefLRUPolicyMSPerMB option only if the metaspace area becomes insufficient in the development environment. Specifying 0 for this option disables all soft references. Because soft references are often used as caches for performance improvement, this option specification might degrade the performance of applications.