On Tuesday 10 June 2008 02:33:47 Dag H. Wanvik wrote:
> Daniel Noll <[EMAIL PROTECTED]> writes:
> > If this is the case, is there some way to *know* when the database
> > shutdown has actually occurred?
>
> Normally, if a VM tries to boot a Derby database which is already
> booted by another VM you will get an error (XSDB6).
This is in the same VM, though, just boot, shutdown, copy new database to same
location, boot, shutdown, etc. You know, like normal unit tests.
What If I put a container around Derby and force all queries through that,
blocking queries which occur after shutdown has started, it does appear to
fix the issue.
My theory is that some event was being fired on another thread and then that
resulted in a query which occurred at the same time as shutdown. Derby
mustn't handle this situation by denying that query or terminating it, but
what ends up happening is the shutdown continues and completes some random
time *after* the call to getConnection("...shutdown") returns (in the middle
of the next unit test.)
Daniel