uCosminexus Application Server, EJB Container Functionality Guide

[Contents][Glossary][Index][Back][Next]

2.17.7 Definitions in cosminexus.xml

You can set the following items in cosminexus.xml:

For details on cosminexus.xml, see 2. Application property file (cosminexus.xml) in the uCosminexus Application Server Application and Resource Definition Reference Guide.

Organization of this subsection
(1) Number of threads that can simultaneously execute the asynchronous invocation processing and retention period of the threads
(2) Timeout of the processing result retention period of the asynchronous method

(1) Number of threads that can simultaneously execute the asynchronous invocation processing and retention period of the threads

Define attributes such as the number of threads that can be simultaneously executed and the retention period of threads in cosminexus.xml. You can set the following parameters:

(2) Timeout of the processing result retention period of the asynchronous method

Set a timeout in the retention period of the Future<V> object used for acquiring the processing result of the asynchronous method invocation that uses a remote interface. If you do not set the timeout, the processing result is retained until the application stops. This can result in an increase in the memory usage volume and occurrence of the OutOfMemory error in cases such as when there are many processing results. To prevent this, set the maximum value of the period for which the results are to be retained. Set the following parameters:

If you invoke the method in the Future<V> object that shows the processing result after deletion, an EJBException that has the character string "KDJE43202-I" in the message is thrown. You can confirm whether "KDJE43202-I" exists in the exception message and determine whether the result is deleted due to a timeout occurrence.

However, in the case of a local client, because the Future<V> object is retained locally, the method ends successfully without throwing any exception.

Notes on the Java heap estimation and Java heap tuning when an asynchronous invocation is to be executed, are as follows:

(a) Java heap estimation when executing the asynchronous invocation

If an asynchronous processing is invoked using the remote interface, the Future<V> object that shows processing results is retained in JavaVM on which the EJB container operates. Therefore, if there are many requests, you must be careful so that the OutOfMemory error does not occur in JavaVM.

When executing the asynchronous invocation, estimate the Java heap size required for each asynchronous method using the following estimation formula.

Java heap size (unit: KB) required for one asynchronous method

=(1+A) [Figure] (B+C+1) [Figure] D

Legend:
A: Object size (KB) depending on the user application
B: Average value (minute) of the asynchronous method execution time
C: Value of the result-timeout-value specified in cosminexus.xml
D: Average execution count of asynchronous methods invoked in one minute

Add the values calculated for each asynchronous method and then calculate the required Java heap size as a whole.

Hint
  • The java heap size required for invoking the asynchronous method in a remote interface is calculated by the above estimation formula. When invoking with a local interface, the result is not maintained in the EJB container and hence estimation is not required.
  • "Object size depending on the user application" is the size of the processing result object. Usually, you need not be aware of the size of the processing result object of the user application. However, if the size is large, change the Java heap size as and when required after measuring the size to be used in the test program.
(b) Notes on tuning the timeout period

Consider the following points regarding the tuning of the timeout period: