Hitachi

uCosminexus Application Server Compatibility Guide


21.4 Asynchronous thread processing by using WorkManager

This section describes the asynchronous thread processing performed by using WorkManager.

The following table describes the organization of this section.

Table 21‒14:  Organization of this section (asynchronous thread processing by using WorkManager)

Category

Title

Reference location

Description

The daemon Work and non-daemon Work

21.4.1

The thread pool and queues used in the non-daemon Work

21.4.2

The life cycle of WorkManager, daemon Work and the non-daemon Work

21.4.3

Implementation

Developing applications by using WorkManager

21.4.4

Settings

Settings in the execution environment

21.4.5

Note:

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

With the asynchronous thread processing performed by using WorkManager, you can execute the asynchronous processing of threads in the Java EE environment. Because the threads managed by a container are used in the background, you can execute tasks safely.

Implement the process to be executed asynchronously, with Work. The process implemented with Work is scheduled when you execute the schedule method of WorkManager in EJBs or servlets, which are the schedule sources. You can check the schedule status by using WorkItem, which is returned by the schedule method of WorkManager.

To use WorkManager, define the information related to WorkManager, in <resource-ref> tag of EJB properties or servlet properties. The EJB or servlet uses WorkManager by performing lookup with the name defined in <res-ref-name> tag at the time of deployment.

Organization of this section