uCosminexus Application Server, Expansion Guide
You can stop a running batch application as and when required. This is called Forced Stop of a batch application. This subsection describes Forced Stop of a batch application.
You use the cjkilljob command to forcefully stop a batch application. You use the following three methods to execute the cjkilljob command:
Note that if an attempt to forcefully stop a batch application fails, the batch server is forcefully stopped. As a result, when executing multiple applications in continuation, you must restart the batch server. We recommend that you tperform settings in advance, in such a way so that the batch server automatically restarts, when an attempt to forcefully stop the batch application fails. You can implement automatic restart of a batch sever by using operation monitoring of Management Server. For details, see 2.4. Automatic restart when failure occurs in the uCosminexus Application Server Operation, Monitoring, and Linkage Guide.
You use the cjkilljob command to forcefully stop a running batch application. When using the cjkilljob command, you execute the method cancellation for the thread that executes the batch application, and forcefully stop the batch application.
The method cancellation is a functionality that cancels the running methods. However, you may or may not cancel a method, depending on the area where you are executing the method. The area where you can cancel a method is called a non-protected area and the area where you cannot cancel a method is called a protected area. A method is canceled if the method under execution is in a non-protected area. The same method cancellation is performed during the forced stop of a batch application that is performed by the functionality of monitoring the J2EE application execution time. For details on the method cancellation processing, see 5.3.4 Method cancellation in the uCosminexus Application Server Operation, Monitoring, and Linkage Guide.
The following processes are executed when you forcefully stop a batch application.
The following table describes the conditions where a batch application is forcefully stopped:
Table 2-5 Conditions for forced stop of a batch application
| Condition for forced stop of batch application | Batch server operation | cjexecjob command operation |
|---|---|---|
| Batch forced stop command is executed during the execution of a batch application. | Outputs KDJE55004-I message and starts forced stop of the batch application. Outputs KDJE55005-I message when forced stop is complete. Outputs KDJE55017-E message, if an attempt to execute forced stop fails. | Normal path when performing batch forced termination Return value: 1 |
If you execute a batch application by using the adshjava command of JP1/Advanced Shell, JP1/Advanced Shell automatically executes the cjkilljob command and forcefully stops the batch application when you forcefully stop a job of JP1/Advanced Shell.
If an attempt to forcefully stop a batch application fails, the batch server is forcefully stopped. When executing multiple batch applications in continuation, you must restart the batch server before starting a batch application that is to be executed after forcefully stopping the batch server. Hence, set up in such a way so that the batch server automatically restarts by using Management Server. For details, see 5.3.4 Method cancellation in the uCosminexus Application Server Operation, Monitoring, and Linkage Guide.
All Rights Reserved. Copyright (C) 2013, 2015, Hitachi, Ltd.