[ 
http://issues.apache.org/jira/browse/DERBY-1326?page=comments#action_12415929 ] 

Deepa Remesh commented on DERBY-1326:
-------------------------------------

Thanks again for posting a detailed description. I read through the description 
and patch "unify_NSImpl_instances.diff " quickly. 

I have few small comments/questions:

* Currently, the patch does the following "Modify the DRDAServerStarter boot 
code so that it loads the embedded engine. " The description also mentions 
this: "an alternative would be to load the embedded engine in 
NetworkServerControlImpl.start()". I like this alternative. I am thinking of 
the scenario where derby.drda.startNetowrkServer property is set and we boot 
embedded driver. In this scenario, if we load the embedded engine in the 
DRDAServerStarter boot code, it will appear that we are trying to boot the 
embedded driver twice. However, this will not do any harm as it will be a 
no-op. I think it would be better to avoid doing this as it causes confusion 
why we are loading the driver again when we trace the path from loading 
embedded engine.

* There is a slightly different code path when we start network server from the 
command line. In this case, we create an instance of NetworkServerControlImpl 
and then call executeWork which processes the "start" command by calling 
blockingStart(). There is no DRDAServerStarter involved here as we do not need 
to launch another thread. This is not very relevant for the current patch but 
just mentioning it in case we plan to re-organize the code. 

* It looks like the only purpose of calling DRDAServerStarter in 
NetworkServerControlImpl.start method is to launch a separate thread. The 
javadoc comment for NetworkServerControlImpl.start says:
        /**
         * Start a network server.  Launches a separate thread with 
         * DRDAServerStarter.  Want to use Monitor.startModule,
         * so it can all get shutdown when cloudscape shuts down, but 
         * can't get it working right now.

>From  current behaviour, we do not shutdown network server when we shutdown 
>Derby. Does anyone know if there is any plan to do as indicated by the 
>comment: "Want to use Monitor.startModule, so it can all get shutdown when 
>cloudscape shuts down, but can't get it working right now." ? 

> Network server may abandon sessions when Derby system is shutdown and this 
> causes intermittent hangs in the client
> ------------------------------------------------------------------------------------------------------------------
>
>          Key: DERBY-1326
>          URL: http://issues.apache.org/jira/browse/DERBY-1326
>      Project: Derby
>         Type: Bug

>   Components: Network Server
>     Reporter: Deepa Remesh
>     Assignee: Bryan Pendleton
>  Attachments: repro1326.java, resolve_DRDConnThread_conflict.diff, 
> sessionMgmt1.diff, sessionMgmt1_and_nosessionsforclosedthreads.diff, 
> unify_NSImpl_instances.diff, withNewThreadAndNoShutdownOfCurrentSession.diff
>
> This issue was found when working on DERBY-1219. More details can be found in 
> the comments at http://issues.apache.org/jira/browse/DERBY-1219

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to