4.3.3 Settings for the execution environment
The resource depletion monitoring functionality can be used on the J2EE server or batch server. In J2EE servers, the resources that can be monitored include memory, file descriptors, number of threads, thread dumps, HTTP requests pending queue, number of sessions, and connection pools. In batch servers, the resources that can be monitored include memory, file descriptors, number of threads, thread dumps, and connection pools. Note that file descriptors cannot be monitored in Windows and AIX. Furthermore, the number of threads cannot be monitored in Linux.
The following settings are required when using the resource depletion monitoring functionality:
-
J2EE server
-
Hitachi Connector Property file
-
J2EE application
You reference the above settings only for setting or changing the properties of J2EE applications that do not include cosminexus.xml.
- Organization of this subsection
(1) Setting J2EE servers
You implement the J2EE server settings in the Easy Setup definition file. Specify the definition for resource depletion monitoring functionality in the <configuration> tag of the logical J2EE server (j2ee-server) in the Easy Setup definition file. You specify the settings for each batch server in the user properties for the batch server, in the Easy Setup definition file.
The following two definitions are specified for the resource depletion monitoring functionality in the Easy Setup definition file:
-
Application of the resource depletion monitoring function
-
Settings for monitoring for each resource type
(a) Enabling the resource depletion monitoring function
Specify whether you want to use the resource depletion monitoring functionality in the ejbserver.watch.enabled parameter of the <configuration> tag that exists in the logical J2EE server (j2ee-server) in the Easy Setup definition file. By default, the resource depletion monitoring function is applied and all the resources are monitored. To disable the resource depletion monitoring functionality, you specify false (disable the resource depletion monitoring functionality) in the ejbserver.watch.enabled parameter.
(b) Setting for monitoring for each resource type
The following table describes the definitions for monitoring each resource type exists in the Easy Setup definition file:
- Legend:
-
--: None
#1 To perform memory monitoring, define the Java VM start parameters under the <configuration> tag for the logical J2EE server (j2ee-server). Specify -XX:MetaspaceSize and -XX:MaxMetaspaceSize as the Java VM start parameters and set the same memory size for these parameters. If you set different memory sizes, no alert might be generated when Full GC occurs. The following contents are to be specified for the JavaVM start parameter:
- <param-name> tag
-
add.jvm.arg
- <param-value> tag
-
-XX:MetaspaceSize=setup-value
-XX:MaxMetaspaceSize=setup-value
To detect symptoms that trigger Full GC, you must tune the sizes of the Old and New areas of Java VM.
#2 Specify the number of files and the size for the resource depletion monitoring log file in the following parameters of the Easy Setup definition file:
-
ejbserver.logger.channels.define.name-of-resource-to-be-monitoredWatchLogFile.filenum
Specifies the number of resource depletion monitoring log files for each resource type.
-
ejbserver.logger.channels.define.name-of-resource-to-be-monitoredWatchLogFile.filesize
Specifies the size of the resource depletion monitoring log file for each resource type.
In these parameters, specify the channel name for each resource type as the name of the resource to be monitored.
-
For memory: MemoryWatchLogFile
-
For file descriptor: FileDescriptorWatchLogFile
-
For the number of threads: ThreadWatchLogFile
-
For thread dump: ThreaddumpWatchLogFile
-
For HTTP requests pending queue: RequestQueueWatchLogFile
-
For the number of sessions: HttpSessionWatchLogFile
-
For connection pools: ConnectionPoolWatchLogFile
For details on the Easy Setup definition file and the parameters to be specified, see 4.3 Easy Setup definition file in the uCosminexus Application Server Definition Reference Guide.
(2) Settings for Hitachi Connector Property file
Make the settings for monitoring the connection pool in each resource adapter. You implement the resource adapter property settings using the server management commands and the Hitachi Connector Property file.
Specify the issuing of alert, monitoring threshold values, monitoring intervals, and application of resource depletion monitoring log file output based on monitoring the connection pool in the <WatchEnabled>, <WatchThreshold>, <WatchInterval>, and <WatchWriteFileEnabled> tag specified as the <property-name> tag of the Hitachi Connector Property file.
For details on the tags to be specified, see 4.1 HITACHI Connector Property file in the uCosminexus Application Server Application and Resource Definition Reference Guide.
For resource adapter property settings in the server management commands and the Hitachi Connector Property file, see 3.5.1 Procedure for setting the properties of a J2EE resource adapter in the uCosminexus Application Server Application Setup Guide.
(3) Setting J2EE applications
You implement the settings for the J2EE applications in the execution environment using the server management commands and the property files. Use the WAR property file to define the resource depletion monitoring functionality.
The tags specified in the WAR property file correspond to cosminexus.xml. For details on the definitions of cosminexus.xml, see 4.3.2 Definition in cosminexus.xml.