5.3.11 Confirming the execution status of a J2EE application
When a message indicating that a timeout occurred in a method in a J2EE application or a message indicating that the thread status is incorrect due to the failure in method cancellation is output, check the execution status of the running J2EE application. Determine whether method cancellation can be executed according to the confirmation results.
To check the execution status, use the server management commands (cjlistthread).
Note that this command can also be used for confirming the stack trace acquired in the case of transition of the thread status. However, a stack trace is not output when the thread status is running. Note that when the thread status is stopping, the stack trace is output multiple times, so the latest stack trace will be output instead of the stack trace of the time of transition.
Also, the threads exceeding the maximum number of concurrent executions specified in the Web container might be displayed in a list.
The execution format and example are described below. For details on the cjlistthread command, see cjlistthread (display thread information) in the uCosminexus Application Server Command Reference Guide.
- Execution format
cjlistthread J2EE-server-name
If you specify the -detail option, you can also output the stack trace as details of the running thread information.
cjlistthread J2EE-server-name -detail
- Execution example
cjlistthread MyServer -detail
The following is the format of an execution result when the -detail option is specified:
- Execution result
Current Time=HH:MM:SS ThreadID=11111, RootApInfo=RootAP1, Status=timeout, AppName=AP1, StartTime=HH:MM:SS, TimeOut=60 com.hitachi.XXXX at com.hitachi.YYYY at user.code.UserClass1 at com.hitachi.ZZZZ . . . ThreadID=22222, RootApInfo=RootAP2, Status=stopping, AppName=AP2, StartTime=HH:MM:SS, TimeOut=60 com.hitachi.xxxx at com.hitachi.yyyy at user.code.UserClass2 at com.hitachi.zzzz
The thread status is output after Status = of the execution result.
The following table describes the thread status and the possibility of executing method cancellation:
However, a method cannot be canceled even when the thread status indicates that the method can be canceled, if that method is executed in the Protected area. For details on the protected area, see 5.3.4 Method Cancellation.
- Tip
-
The thread information output by this command is the snapshot when the cjlistthread command is executed. Therefore, the thread information changes every moment. Hitachi recommends you to execute the command multiple times and confirm the information for obtaining the accurate thread status.
Note that if you specify the -detail option, the output quantity of the execution result increases. When you specify the -detail option, Hitachi recommends you to set a file as the output destination.