db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel John Debrunner <...@apache.org>
Subject Re: Another newbie internals question
Date Fri, 25 Jan 2008 23:57:44 GMT
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.

The javadoc for NetworkServerControl.start() indicates one can ping the 
server to check when it is ready:

http://db.apache.org/derby/javadoc/publishedapi/jdbc3/org/apache/derby/drda/NetworkServerControl.html#start(java.io.PrintWriter)

Dan.

Mime
View raw message