Verifying StartupTo verify that the Network
Server is currently running, use the ping command.Network Serververifying startup
You can use the ping command in the following ways:
You can use the scripts NetworkServerControl.bat for Windows systems
or NetworkServerControl.ksh for UNIX systems with the ping command.
For example: NetworkServerControl ping [-h <hostname>;] [-p <portnumber>]You can use the NetworkServerControl command:java org.apache.derby.drda.NetworkServerControl
ping [-h <hostname>] [-p <portnumber>] You can use the NetworkServerControl API to verify startup from
within a Java application: ping(); The following example uses a method to verify startup. It will try
to verify for the specified number of seconds: private static boolean isServerStarted(NetworkServerControl server, int ntries)
{
for (int i = 1; i <= ntries; i ++)
{
try {
Thread.sleep(500);
server.ping();
return true;
}
catch (Exception e) {
if (i == ntries)
return false;
}
}
return false;
}