db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kristian Waagan <Kristian.Waa...@Sun.COM>
Subject Re: Debugging lock timeouts - versuchen01X
Date Wed, 03 Mar 2010 13:00:52 GMT
On 03.03.2010 13:01, Gabriele Kahlout wrote:
> Okay. In my unit tests I try to delete the previous database
> completely, so as to run each test from scratch.
> I close the connection, and then delete all files, however this sticks:
> seg0, c4b0.dat. Does it have any special meaning? Eitherway, how can I
> get rid of it?
> I thought con.close() did the job.


Connection.close() only closes the connection - it neither shuts down 
nor deletes the database itself.
If you want to delete the database files on disk, you really should shut 
down the database first (this is done by connecting to the database with 
"shutdown=true" in the URL, see the manuals for details). Note that 
shutting down the database also invokes a checkpoint, so in most cases 
it should be done also when you are not going to delete the database 
(the checkpoint makes opening the database again faster, as Derby won't 
have to do recovery).

If you don't need the database to be stored on disk at all, you should 
consider using the in-memory back end. In this case the database will be 
deleted when you shut it down. More information at 


> 2010/3/3, Knut Anders Hatlen<Knut.Hatlen@sun.com>:
>> Gabriele Kahlout<gabriele@mysimpatico.com>  writes:
>>> That's interesting. I catch the opportunity to ask, is it possibly to
>>> alias/retrieve the ROWID, of the row? In SQLite that is ROWID, while
>>> reading the Java DB doc, I found no such thing and so tried to
>>> 'simulate' it with RID. However as you pointed above it doesn't alias
>>> the ROWID, which I extensively depend on.
>> Hi Gabriele,
>> There's currently no ROWID support in Derby.
>> --
>> Knut Anders

View raw message