I haven't had time to work on this issue for a long time. Just thought
I'd summarize what I have found out till now in case someone is
TopService.bootModule() has a try/catch like this:
BaseMonitor.boot(instance, create, properties);
catch (StandardException se)
If an exception is thrown in BaseMonitor.boot(), daemon threads might
have been started, but they are not shut down. This can be solved by
in the catch block.
However, this leads to two problems:
1) LogToFile.stop() gets a NullPointerException in
deleteObsoleteLogfiles() because currentCheckpoint is null. This
is easily solved by adding a test for currentCheckpoint == null
and not calling deleteObsoleteLogfiles() if that's the case.
2) If one tries to boot a database that is already booted in another
JVM, BaseMonitor.boot() will fail. However, the call to
TopService.stop() will delete the boot lock, even though it
belongs to another process. Therefore, trying once more to boot
the database will succeed. The solution to this problem is
probably to set a flag (e.g., ownerOfBootLock) when creating the
boot lock file, and to check the value of the flag before
deleting the file.