db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Noll <dan...@nuix.com>
Subject Re: ShutdownException when I haven't asked the database to shut down
Date Mon, 09 Jun 2008 23:27:37 GMT
On Tuesday 10 June 2008 02:33:47 Dag H. Wanvik wrote:
> Daniel Noll <daniel@nuix.com> 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.)


View raw message