db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oskar Zinger <oska...@yahoo.com>
Subject Re: How to reset Derby Database in JVM
Date Tue, 13 Nov 2012 23:27:36 GMT

Hi Rick,

Thank you for the pointers to the right places in the documentation.

Here is what I used:
Shutting down the system:
http://db.apache.org/derby/docs/10.8/devguide/tdevdvlp20349.html
Shutting down Derby or an individual database:
http://db.apache.org/derby/docs/10.8/devguide/tdevdvlp40464.html

I am using Derby Network Server... and I think it would have helped if the
documentation mentioned somewhere that this same approach would work for
Client / Server deployment of Derby. Somehow it seemed to me this would have
only worked for an Embedded deployment of Derby.

Thanks,
Oskar Zinger
 

Rick Hillegas-3 wrote:
> 
> 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
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/How-to-reset-Derby-Database-in-JVM-tp34541038p34676336.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.


Mime
View raw message