The issues with database remaining open after connections are closed was discussed last week.
 
For practical purposes, you do not actually need to close the database. The CSV files that you are using are linked with an HSQLDB table with the SET TABLE name SOURCE .. command. Once you have finished with the CSV files, issue a SET TABLE name SOURCE "" to reset the source to nothing. You can then remove / rename the CSV files and then use SET TABLE name SOURCE again to link to a different or new version of the CSV file.
 
A web application is obviously designed to be on all the time, so having the HSQLDB engine running with empty data is fine.
 
Fred
----- Original Message -----
Sent: 20 January 2004 23:11
Subject: Re: [Hsqldb-developers] HSQLDB.lck file issues

My issue is basically this...
 
I am using the FILE version of HSQLDB to access CVS files so I can import them into my (Oracle /or/ Postgres) database.
 
I manually create these files with one process and using the HSQL driver and Hibernate to access the data and take care of all the Dirty Work for me.
 
Works very well stand alone.  But when I tried to incorporate it into my Tomcat/Spring/Hibernate framework, it just locks up (HSQLDB.lck).
 
I discovered this is because I created a HSQLHibernateSessionFactory bean using the HSQLDataSource in my application-context.xml.
 
On startup Spring must load these and lock them. It doesn't release them again until tomcat is terminated.
 
I removed the references from my application-context.xml and used a straight forward hibernate-HSQLDB.cfg.xml file configuration.  Basically skipped spring all together.. and it works fine.
 
I would like to utilize the spring framework.. is there a better way to do this?  I don't want to run SERVER mode on HSQL since they are basically only temporary import and export files.
 
 
What would you suggest?
 
Cheers
 
Troy
 
 
----- Original Message -----
From: fredt
Sent: Tuesday, January 20, 2004 3:02 PM
Subject: Re: [Hsqldb-developers] HSQLDB.lck file issues

The .lck file prevents two processes from simultaneously opening the database file. It stays there until you shutdown the database.  If it is causing a problem, please state what it is.
 
Fred
----- Original Message -----
Sent: 20 January 2004 22:12
Subject: [Hsqldb-developers] HSQLDB.lck file issues

I am having trouble using HSQLDB using CSV type files.  Running it in tomcat using Hibernate... as soon as the context starts up the lock file appears and it doesn't ever go away.  What exactly creates the lck file and how can I get by it?
 
Troy
 
 

Reply via email to