db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Hillegas <rick.hille...@oracle.com>
Subject Re: How to reset Derby Database in JVM
Date Thu, 11 Oct 2012 12:18:27 GMT
On 10/10/12 6:35 PM, Oskar Zinger wrote:
> Hi Derby Community,
>
> I'm having some difficulties resetting a Derby Database without 
> restarting the whole application (JVM).
>
> I'm deploying Derby Network Server. My application has a service that 
> executes shutdown / start of the Derby Network Server on demand.
>
> // code here to clear Derby connection pool
> derbyServer.shutdown();
> derbyServer = null;
>
> The above does not reset the Derby database.
Hi Oskar,

This may be relevant to the problem you are seeing: When you shutdown 
the server, that does not shut down any booted databases and it does not 
shutdown the Derby engine. Instructions for shutting down a single 
database and the entire engine can be found in the Derby Developer's 
Guide in the section titled "Shutting down Derby or an individual 
database": http://db.apache.org/derby/docs/10.9/devguide/

Hope this helps,
-Rick
>
> For example, what if my database becomes corrupted and I would like to 
> stop the service, remove the database, and copy over my new template 
> database (or recreate the database) without having to restart my whole 
> application. Is this possible?
>
> Thanks,
> Oskar Zinger


Mime
View raw message