Returns the state of service components executing in the server.
getservicestate connect-args servicename
<jag_getsevicestate servicename=”servicename “
Option |
Description |
Required |
---|---|---|
connect-args |
Arguments to specify a connection to the server. See “Using connected mode”. |
Yes |
servicename |
The name of the service to query, or
all to list the state of all services. jagtool fails
with an error message if you specify the name of a service that
is not installed or that does not implement the interface |
Yes |
Return value |
Indicates |
---|---|
0 |
The command ran successfully; the result is true/success. |
1 |
The command ran successfully; the result is false/failure. |
2 |
The command did not run successfully; an exception was thrown. |
This command prints the service state, using the terms listed in Table 12-5.
State |
Description |
---|---|
|
The state is unknown because the service
does not implement the |
|
The service is starting. The start method has been called, but has not returned. |
|
The service is started, but not yet running. The start method has returned, but run has not been called. |
|
The service is running, that is, executing the run method. |
|
The service is finished processing. The run method has returned. This state applies only to services that do not run continuously until stopped. |
|
The service is stopping. The stop method has been called, and is still running. |
|
The service is stopped. The stop method has been called and has returned. |
For example, this is the typical output for a server where the message service is not installed:
jagtool getservicestate all JaguarServlet/ServletService's state is RUNNING CosNaming/JNameService's state is FINISHED
This command is useful when running jagtool or jagant from scripts that start or restart the server. You can check the output to determine if the required service is running. For example, components should not be deployed before the name service has finished, and JMS entities cannot be created before the message service is running.
Chapter 33, “Creating Service Components,” in the EAServer Programmer’s Guide.
Copyright © 2005. Sybase Inc. All rights reserved. |