Hitachi

uCosminexus Application Server Definition Reference Guide


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

(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.

Table 2‒2: Specifiable keys and default values in usrconf.cfg (J2EE servers)

Key name

Contents

Default

VR

add.jvm.arg

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.

--

add.class.path

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

--

add.library.path#1

Specify the shared library for JNI only when the container extension library uses JNI.

None

--

cpp.library.version

Specify the version of libstdc++ library used in the process. Note that this key is used in Linux.

The following string can be specified:

6:

Use the libstdc++.so.6 library.

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

--

ejb.public.directory

Start a J2EE server using the specified directory as the working directory of J2EE server. The current directory of J2EE server is as follows:

  • In Windows

    Cosminexus-working-directory\ejb\server-name

  • In UNIX

    Cosminexus-working-directory/ejb/server-name

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.

  • In Windows

    Cosminexus-installation-directory\CC\server\public

  • In UNIX

    /opt/Cosminexus/CC/server/public

--

ejb.server.corefilenum (in UNIX)

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.

Target core files

Cosminexus-working-directory/ejb/server-name/core*

  • To delete all the core files when you restart the J2EE server, specify 0.

  • In the case of manual operations, or when you intend to use the Management Server, specify 1 or more.

Among the target core files, those core files that may be overwritten or deleted during restart, are renamed.

In Linux (settings with process ID)

core.core-generated-process-ID -> core.core-generated-process-ID.core-file-creation-date-and-time

For cases other than the above

core -> core.core-file-creation-date-and-time

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:

  • When a file having the same name as that of the target core file is created, the file created by the user will be deleted.

  • The core files are deleted when a J2EE server is restarted, therefore, sometimes more core files may be output than the defined number of files until the J2EE server restarts.

  • Keep a check on the disk capacity, as the defined number + n number of core files is left on the disk. (n: the number of core files output by a J2EE server until the server is restarted).

1

--

ejb.server.log.directory

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.

  • In Windows

    Cosminexus-working-directory\ejb\server-name\logs

  • In UNIX

    Cosminexus-working-directory/ejb/server-name/logs

--

ejb.server.log.stdout.filesize

Specify an integer from 4096 to 2147483647 (unit: byte) as the upper-limit for the size of the cjstdout.log file.

1048576

--

ejb.server.log.stderr.filesize

Specify an integer from 4096 to 2147483647 (unit: byte) as the upper-limit for the size of the cjstderr.log file.

1048576

--

jvm.type

Specify the type of JavaVM to be used. You can specify one of the following values:

  • server

    Java HotSpot Server VM is used.

  • client

    Java HotSpot Client VM is used.

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

--

Legend:

--: Indicates a version earlier than the version 08-00.

#1

If both the add.library.path and OS environment variables (such as LIBPATH) are set up when executing the cjstartsv command or cjstartweb command, the add.library.path settings have a higher priority.

#2

The log files listed below will be changed:

Types of log

Contents

Log collection directory and log file names

Message log

Operation log

  • In Windows

    ejb.server.log.directory-key-value\cjmessage?.log

  • In UNIX

    ejb.server.log.directory-key-value/cjmessage?.log

Log operation log

  • In Windows

    ejb.server.log.directory-key-value\cjlogger.log

  • In UNIX

    ejb.server.log.directory-key-value/cjlogger.log

User log

Web servlet log

  • In Windows

    ejb.server.log.directory-key-value\web_servlet?.log

  • In UNIX

    ejb.server.log.directory-key-value/web_servlet?.log

User output log

  • In Windows

    ejb.server.log.directory-key-value\user_out?.log

  • In UNIX

    ejb.server.log.directory-key-value/user_out?.log

User error log

  • In Windows

    ejb.server.log.directory-key-value\user_err?.log

  • In UNIX

    ejb.server.log.directory-key-value/user_err?.log

JavaVM maintenance information and GC log

  • In Windows

    ejb.server.log.directory-key-value\javalog??.log

  • In UNIX

    ejb.server.log.directory-key-value/javalog??.log

Event log

Event log for the Explicitly Memory Management functionality of JavaVM

  • In Windows

    ejb.server.log.directory-key-value\ehjavalog??.log

  • In UNIX

    ejb.server.log.directory-key-value/ehjavalog??.log

Exception log

Exception information in the case of failure

  • In Windows

    ejb.server.log.directory-key-value\cjexception?.log

  • In UNIX

    ejb.server.log.directory-key-value/cjexception?.log

Maintenance log of resource adapter

--

  • In Windows

    ejb.server.log.directory-key-value\connectors\display-name-of-resource-adapter?.log

  • In UNIX

    ejb.server.log.directory-key-value/connectors/display-name-of-resource-adapter?.log

TPBroker trace

Trace information of TPBroker

  • In Windows

    In ejb.server.log.directory-key-value\TPB

  • In UNIX

    In ejb.server.log.directory-key-value/TPB

Legend:

--: Not applicable

(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

(7) Notes