Hitachi

uCosminexus Application Server Expansion Guide


2.3.1 Overview of the batch application execution functionality

The batch application execution functionality is used for executing batch applications. A batch application is executed on batch loader provided with the batch application execution functionality. The contents output by the batch application that is being executed are output to the log output functionality.

The following figure shows the batch application execution functionality.

Figure 2‒6: Overview of the batch application execution functionality

[Figure]

You can integrate the batch application execution functionality with the EJB access functionality and the resource connection functionality.

For details on the EJB access functionality, see 2.4.1 Functionality that you can use with EJB access and for details on the resource connection functionality, see 2.7 Resource connection functionality.

The following subsections describe life cycle of a batch application and a class loader that executes the batch application:

Organization of this subsection

(1) Life cycle of a batch application

You use the cjexecjob command to start a batch application. The following figure shows the life cycle of a batch application.

Figure 2‒7: Life cycle of a batch application

[Figure]

  1. If you execute the cjexecjob command, batch class loader loads a batch application.

  2. The batch application is executed on a batch server.

  3. The batch application processing ends.

    After the batch application processing ends, GC occurs for the batch class loader that loaded the batch application.

  4. Classes of the batch application are unloaded.

    Important note

    A batch application is loaded to a batch class whenever you execute the cjexecjob command and the class is unloaded when processing is complete. We do not recommend that you operate a resident batch application on a batch server.

(2) State transition of a batch application

The following figure shows the state transition of a batch application.

Figure 2‒8: State transition of a batch application (When the scheduling functionality is not used)

[Figure]

RUNNING is a state that shows that the batch application is executing on a batch server.

You can confirm the state of a batch application from the batch application information. For details on how to display the batch application information, see 2.3.4 Displaying list of batch application information.

(3) Class loader executing a batch application

When executing a batch application, a class loader for the batch application is generated on the batch server. The batch application is executed on the class loader. The following figure shows the configuration of a class loader for batch applications.

Figure 2‒9: Configuration of a class loader executing batch applications

[Figure]

The following subsections describe the above figure:

When a batch class loader is generated, a message stating that the batch class loader is generated is output (KDJE55013-I message). A message stating that end processing of the batch class loader is executed is also output (KDJE55014-I message).

For details on precautions to be taken for destroying class loader, see Appendix B.1 Configuring default class loader in the uCosminexus Application Server Common Container Functionality Guide. Properly read the class loader destruction timing and the message that is output when destroying the class loader.