I am writing about the well known error: "Failed to start database '...' with class loader ..." I realize that you cannot have two simultaneous connections from two different JVMs to a derby embedded database. My question is whether or not it is possible to disconnect / "unload" / "unboot" one connection in order to load up the other one, etc. Or does the first JVM have to entirely stop before the next one can make a connection?
I ask for TDD reasons. One of the tests I'm trying to write (on cucumber / jruby) requires some out-of-process testing. i.e. I have one process (cucumber) invoking the tests, which requires the spawning of another process. I would like the parent process to be able to turn off its connection to the embedded database (without shutting down), such that it can allow the spawned process to access the database, and then turn it back on and make sure things went as planned after the other process completes.
You can shutdown a single database without exiting the JVM using the shudown=true attribute if using a DriverManager connection:
Is this possible?