You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by Frank Griffin <ft...@roadrunner.com> on 2008/02/01 23:21:02 UTC

Re: Another newbie internals question

Daniel John Debrunner wrote:
> Frank Griffin wrote:
>> Kathey Marsden wrote:
>>> Frank Griffin wrote:
>>>> get-go (of course, how you could open JDBC access without actually
>>>> opening JDBC access is a bit of a conundrum).
>>>>
>>>> Any ideas or direction ?
>>>>
>>>>   
>>> You could connect with the embedded driver to do your initial setup
>>> before starting network server and letting clients in. 
>> I gave this a try, and almost got it to work.  My code does its initial
>> setup by loading the embedded driver and submitting CREATE FUNCTION
>> statements, and that works fine.  When it's done, it tries to turn
>> control over to the Network Server.  The problem is, the Network Server
>> returns immediately, the app returns, and the JVM shuts down.
>
> I think the jvm is exiting because your are returning from your java
> main method before the network server gets a chance to start its thread.
>
Thanks for the reply, but I think that the difference is that
NetworkServerControl.main() calls the executeWork() method, while
NetworkServerControl.start() does not.  The docs say that users of an
embedded NetworkServerControl are supposed to call start().