Hitachi

uCosminexus Application Server Expansion Guide


3.7.3 Locking and controlling requests for a J2EE application

When you stop a J2EE application, the system can wait until all requests in the schedule queue are processed. If the J2EE application that you stop is the last of the J2EE applications that share the schedule queue, there might be requests in the schedule queue. If the system waits, these requests will be processed successfully.

This subsection provides an overview of locking and controlling requests for a J2EE application, and describes the procedure for locking a schedule queue.

Organization of this subsection

(1) Overview of locking and controlling requests for a J2EE application

When the last of the J2EE applications that share a schedule queue stops, the CTM daemon closes the entrance of the schedule queue to perform a service lock so that the queue receives no more requests. After that, the system waits until all requests in the schedule queue are processed, and then stops the J2EE application.

The following figure shows an overview of locking and controlling requests for a J2EE application.

Figure 3‒17: Overview of locking and controlling requests for a J2EE application

[Figure]

When CTM executes the locking and controlling of requests for a J2EE application, the following operations take place:

(2) Procedure for locking schedule queues

Use the management command to lock schedule queues.

The following shows the format and execution examples of the management command executed when all J2EE applications on a specific host are stopped. For details about the management command, see mngsvrutil (Management Server management command) in the uCosminexus Application Server Command Reference Guide.

Format:
mngsvrutil -m Management-Server-host-name[:port-number] -u management-user-ID -p management-password -t host-name -k host hold queues in:request-completion-wait-time-(sec.)
Execution examples:
  • To perform a service lock and wait for all requests to be processed, execute the following command:

    mngsvrutil -m mnghost -u user01 -p pw1 -t host01 -k host hold queues in:0

  • To perform a service lock, continue processing of requests for 5 minutes, and discard requests that are still running, execute the following command:

    mngsvrutil -m mnghost -u user01 -p pw1 -t host01 -k host hold queues in:300

  • To perform a service lock and immediately discard requests, execute the following command:

    mngsvrutil -m mnghost -u user01 -p pw1 -t host01 -k host hold queues in:-1

To unlock schedule queues, execute the mngsvrutil command with the release subcommand specified. The following shows the format and an execution example of the mngsvrutil command.

Format:
mngsvrutil -m Management-Server-host-name[:port-number] -u management-user-ID -p management-password -t host-name -k host release queues
Execution example:
mngsvrutil -m mnghost01 -u user01 -p pw1 -t host01 -k host release queues