On 07/ 9/10 05:57 AM, Daniel Noll wrote: > Hi all. > > We are embedding DerbyNetworkServer to serve databases to clients, and > I would like to automatically shut down databases once they are no > longer in use to reclaim system resources but also to allow moving > files out of the directory if they are no longer being used. > Currently Derby will keep them open, which ultimately locks the data > from being moved around. > > Shutting them down is quite simple, but if there is a user connected > then I'm sure this will cause undesirable or at least undefined > results. > > Is there some way to know which ones are in use before shutting it down? >
Hi Daniel, You can retrieve this information with the network server's runtimeinfo command, either by invoking "java -jar derbynet.jar runtimeinfo" or by calling NetworkServerControl's getRuntimeInfo() method. Look for lines starting with "Database" in the returned string. -- Knut Anders
