db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sunitha Kambhampati <ksunitha...@gmail.com>
Subject Re: Questions about Network Server API Behavior
Date Thu, 29 Jun 2006 00:38:44 GMT
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.'

> 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 .


View raw message