db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel John Debrunner (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-1465) NetworkServerControl.start() should throw an exception and not just print exceptions if the server fails to start
Date Wed, 23 May 2007 01:05:16 GMT

    [ https://issues.apache.org/jira/browse/DERBY-1465?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12498068

Daniel John Debrunner commented on DERBY-1465:

The old thread was started as a daemon thread, in derby's daemon thread group, but this new
thread isn't (for either).

I think Bryan was trying to clean up the code to start the network server, I wonder if that
has progressed to be useable, because this is adding another mechanism to start the server
in already confused code.

There are a couple of timing bugs in the wait code:

 - There is a chance the server can fail to start but the start method will not throw any
This is because the waiter is notified before 'runtimeException' is set, thus the waiter may
see runtimeException as null and not throw an exception.

- There is a chance the start() method will hang, if the spawned thread reaches the notifyAll()
before the start() call reaches the wait().
   The standard way to avoid this is to include boolean state information, so that the sync
calls are like:
			synchronized (serverStartComplete) {
                                completedBoot = true;

                        while (!completedBoot )

I wonder if the code could be modifed slightly to use the old thread, rather than creating
a new thread ...

> NetworkServerControl.start() should throw an exception and not just  print  exceptions
 if the server fails to start
> --------------------------------------------------------------------------------------------------------------------
>                 Key: DERBY-1465
>                 URL: https://issues.apache.org/jira/browse/DERBY-1465
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Server
>    Affects Versions:
>            Reporter: Kathey Marsden
>         Assigned To: Kathey Marsden
>            Priority: Minor
>             Fix For:
>         Attachments: DERBY-1465_diff.txt, DERBY-1465_diff.txt, DERBY-1465_stat.txt, DERBY-1465_stat.txt,
> NetworkServerControl.start()  will not throw an exception  if another server is already
running on the same port.    I am not sure but think perhaps this was changed at  one point
to accomodate the derby.drda.startNetworkServer property  so that the embedded server could
continue to boot even if the network server failed to start, but  I think this is wrong for
normal usage.
> http://www.nabble.com/Questions-about-Network-Server-API-Behavior-p5055814.html

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message