Hitachi

uCosminexus Application Server Compatibility Guide


21.2.1 Procedure for the asynchronous parallel processing of threads

To execute the asynchronous parallel processing of threads, perform the lookup of TimerManager or WorkManager from EJBs and servlets. This section describes the flow of the asynchronous timer processing by using TimerManager and the flow of the asynchronous thread processing by using WorkManager.

Flow of the asynchronous timer processing by using TimerManager

The following figure shows the flow of the asynchronous timer processing by using TimerManager.

Figure 21‒1: Flow of the asynchronous timer processing by using TimerManager

[Figure]

EJBs and servlets are the sources of the schedule for invoking the asynchronous parallel processing to be executed.

TimerManager is created when JNDI performs a lookup. You implement an entity of the processing to be executed, in TimerListener, which is a listener provided by TimerManager. TimerListener executes the processing by accessing JNDI or JCA, as and when required.

Flow of the asynchronous thread processing by using WorkManager

The following figure shows the flow of the asynchronous thread processing by using WorkManager.

Figure 21‒2: Flow of the asynchronous thread processing by using WorkManager

[Figure]

EJBs and servlets are the sources of the schedule for invoking the asynchronous parallel processing to be executed.

WorkManager is created when an application starts. If a lookup is performed by JNDI, the WorkManager created when the application starts is returned. You implement the entity of the processing to be executed, in Work or WorkListener provided by WorkManager. Work or WorkListener executes the processing by accessing JNDI or JCA, as and when required.