db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knut Anders Hatlen <Knut.Hat...@Sun.COM>
Subject Re: AntiGC Not Shutting Down
Date Mon, 24 Oct 2005 19:18:41 GMT
samer@kanjo.net writes:

> I do not receive any errors when starting the database using
> NetworkServerControl.start method. I also shutdown the database using
> NetworkServerControl.shutdown method. I do receive a socket error when
> shutting
> down, which seems to be used to indicate the successful shutdown of
> the server.

NetworkServerControl.shutdown() doesn't shut down the database, only
the network server. That explains why AntiGC and RawStoreDaemon are
still running.

> The server is started and shutdown within the same JVM instance as my
> application. This is not ideal but I am forced to do so if I want to have any
> control over an environment in which I have extremely limited control.

If the application is supposed to access the database (using the
embedded driver) after you have called
NetworkServerControl.shutdown(), AntiGC and RawStoreDaemon should
continue running. Otherwise, you need to unload the Derby driver.

You have (at least) three options:

1. NetworkServerControl.shutdown() stops the network server (listener
   and all DRDAConnThreads).

2. DriverManager.getConnection("jdbc:derby:databasename;shutdown=true")
   will close the database "databasename" and stop the RawStoreDaemon
   thread started by that database. RawStoreDaemons started by other
   databases and AntiGC are not stopped.

3. DriverManager.getConnection("jdbc:derby:;shutdown") closes all
   databases and stops AntiGC and all RawStoreDaemons.

-- 
Knut Anders


Mime
View raw message