Hitachi

uCosminexus Application Server Compatibility Guide


21.3 Asynchronous timer processing by using TimerManager

This section describes the asynchronous timer processing by using TimerManager.

The following table describes the organization of this section.

Table 21‒10:  Organization of this section (Asynchronous timer processing by using TimerManager)

Category

Title

Reference location

Description

Threads scheduling method by using TimerManager

21.3.1

The life cycle of TimerManager

21.3.2

The state transition of TimerManager

21.3.3

Multiple schedules of TimerManager

21.3.4

Implementation

Developing applications by using TimerManager

21.3.5

Note:

There is no specific description of Settings, Operations, and Notes for this functionality.

With the asynchronous timer processing performed by using TimerManager, you can schedule the asynchronous processing of threads in a Java EE environment by specifying an execution interval. Threads managed by a container are used in the background, and hence you can safely execute tasks.

In TimerListener, you implement the process that performs scheduling. The processing implemented in TimerListener is scheduled by executing the method of TimerManager in EJBs or servlets, which are the schedule sources. You can respond to the schedule or cancel the schedule by using Timer, which is returned from the schedule method of TimerManager.

To use TimerManager, you define the information related to TimerManager in the <resource-ref> tag of an EJB attribute or a servlet attribute. An EJB or a servlet uses TimerManager by performing a lookup with the name defined in the <res-ref-name> tag at the time of deployment.

Organization of this section