db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel John Debrunner <...@apache.org>
Subject Re: Multiple database reboots in a single program?
Date Tue, 16 Oct 2007 16:33:13 GMT
Kim Haase wrote:
> While working on a fix for DERBY-1823 (a documentation issue concerning 
> user authentication and authorization), I've tried to write a sample 
> Java program that connects to a database using the embedded driver, does 
> some things, shuts it down, starts it up, does some more things, shuts 
> it down again, and so on. I always get an error trying to connect to the 
> database the second time, although I've followed the advice in "Shutting 
> down the system" 

You are shutting down the complete Derby system, not just the database. 
This means in order to reconnect to databases you need to restart Derby. 
This is done by loading the JDBC driver again, you will need to actually 
create an instance of the driver, since the class will already be loaded.

HTH,
Dan.

Mime
View raw message