Hi
My application must delete a derby database under certain contidions.
The scenario is, that a limited group of users edit and review data in a
"work-database" and from time to time, release their work to the public.
The release is done by creating a copy of the "work-database" and
redirect all new requests to the new "public-database". The old
"public-database" stays in place to serve requests, that have not been
finished at the time of the release. This works well so far.
But after these old requests have been served, I want to delete the old
"public-database". As I understand from other posts to this mailing
list, deleting a derby database means, deleting the database-directory
from the filesystem. But I face two problems with that:
1. How can I determine that no connections/sessions to the old
"public-database" are open?
2. How can I tell the derby network server to "release" the old
"public-database", so I don't run into a "file is by an other person or
program" error? The networkserver seems to hold some file-locks, so i
can't just delete the directory. I don't want to shut down the whole
network server, since it is serving the other databases.
Thanks
Damian
- Delete Database that is locked by the network server Damian Hofmann
-