db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robert stephens <stephe...@acm.org>
Subject Can't Delete Lock on toursDB After App Disconnect Using org.apache.derby.jdbc.EmbeddedDriver
Date Wed, 24 Nov 2004 16:10:26 GMT
I understand that the org.apache.derby.jdbc.EmbeddedDriver does not 
support simultaneous connections to a Cloudscape database however it 
appears that even after the Java app that was using the database 
disconnects and quits, there is still a lock indicated somehow on the 
database. I think the additional lock information is located somehow in 
the toursDB/log/log1.dat file or another file in the log directory.

Problem Example ---------> For example, I can connect to the example 
"derbyDB" database from App1 and can connecto to the example "toursDB" 
from App2 but after disconnecting and quiting both App1 and 
App2.............App2 is never able to start by itself and connect to 
the "derbyDB" because "once upon a time" App1 had connected to it even 
though App1 is no longer running.

Question1------> Why is it that I can't use another application (or 
some times the same one) to connect to toursDB or derbyDB after another 
application has connected and then quit/disconnected?

Question2 -----------> Can I delete a lockfile somewhere to solve the 
problem? After either App1 or App2 "touches" any of the databases I do 
notice a "dbex.lck" file in the top "toursDB" directory. If I delete 
this file it still doesn't let another app connect to this database and 
I stll get the Error "Failed to start database. 
/Applications/IBM/Cloudscape_10.0/demo/databases/toursDB. See the next 
exception for details" but there isn't another exception thrown that I 
can see from the app.

Question3-------> Is there a "System Wide" Java parameter I can set 
that will clear any existing locks on any databases and how can I check 
to see if a database has an existing lock on it (both programmatically 
and by looking at the file system)

thanks,

stephensr@acm.org
Mime
View raw message