uCosminexus Application Server, EJB Container Functionality Guide

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

2.12.5 Functionality for operating the Timer Service

The functionality used for operating the Timer Service is explained below. The operation functionality consist of the following two types:

Customize the properties of a J2EE server to specify the functionality. For details on the properties to be set up, see 2.12.9 Settings in the execution environment.

Organization of this subsection
(1) Functionality for controlling the number of callback threads of the timeout method
(2) Retrying callback of the timeout method

(1) Functionality for controlling the number of callback threads of the timeout method

Specify the number of threads to be executed concurrently in the entire J2EE server for processing callback of the timeout method. This is called the maximum number of callback threads.

When multiple EJB timers timeout concurrently, depending upon the maximum number of callback threads of the timeout method, the operation will be as follows:

The following figure shows the relationship between the settings for the maximum number of callback threads and callback processing:

Figure 2-25 Relationship between the settings for the maximum number of callback threads and callback processing

[Figure]

In this figure, the settings are specified so that EJB timer 2 will be timed out one minute after the timeout of the EJB timer 1 occurs. When the maximum number of callback threads is set to 1, the callback processing of EJB timer 2 will start after the callback processing of the EJB timer 1 finishes. When the maximum number of callback threads is specified as 2, two callback processes can be executed concurrently, therefore, the callback processing of EJB timer 2 is started one minute after the EJB timer 1, as per the settings.

Note
Even if there is a surplus in the number of callback threads, but a shortage of instances of Enterprise Beans, the callback processing is executed after awaiting release of the instances. Therefore, specify the Enterprise Bean instance pool after considering the number of instances to be called back.

(2) Retrying callback of the timeout method

In the case of a failure in calling back the timeout method, retry callback.

Callback may fail in the following cases:

Set the following settings for retrying callback:

Number of retry
Specify the number of retries. When you specify 0, retry is not performed. If the count of executing retries reaches the specified retry number, retry is not performed at a timeout.

Interval of executing retry
Specify the time period from failure of a callback until the retry callback.