Kathey Marsden wrote:

2) If another server was started on the same port, NetworkServerControl.start() prints the exception to the console output, but does not throw an exception I think that this also is a bug and Network Server should throw an exception if another server is up, but wanted to check. It may have been changed not to when derby.drda.startNetworkServer was added but I am not sure.

I think this is a bug. It can get confusing for applications. Lets say - App1 starts network server on port 1527. Another application app2 uses the NetworkServerControl api to start the server on 1527 and never really hits an exception so assumes all is well. Also the javadoc for the api for start says 'An exception will be thrown if there is an error starting the server.'
http://db.apache.org/derby/docs/10.1/publishedapi/org/apache/derby/drda/NetworkServerControl.html#start(java.io.PrintWriter)

3) It seems like it would be useful to have a start method with a timeout and/or derby property to determine the timeout period so that users would not need to write the associated ping code with start.

+1. It will be useful for users to have a start methodapi that starts the server in some timeout or if there is some problem, throws an exception

 Below  is the program output and code.

Thanks Kathey for posting the program. It maybe be a good idea to post program with code to start the server and associated ping method on the wiki .

Sunitha.


Reply via email to