These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: HSQLDB file type database doesn't close correctly
PostPosted: Mon Jan 07, 2008 8:38 am 
Newbie

Joined: Sat Oct 28, 2006 3:05 pm
Posts: 10
Hi. To simplify testing I'm using the latest version of HSQLDB (1.8.0.9), the db type is file and I'm creating cached tables:
- the jdbc url is: jdbc:hsqldb:file:db/test
- by default, org.hibernate.dialect.HSQLDialect creates in memory tables, so I subclassed it and overrode the getCreateTable() method to return "create cached table" (works fine, since it creates the db/test.data file).

However, when I close the app the db/test.lck file doesn't dissapear, and not does the log file. Also, the data file contains 1 Mb worth of null characters. So I tried changing the url to: jdbc:hsqldb:file:db/test;shutdown=true, and nothing happens. So I changed hibernate.cfg.xml to contain:
<property name="hibernate.connection.shutdown">true</property>
This time, the shutdown property is logged by hibernate (which was NOT the case when used the changed url), but again, this doesn't seem to be working.
When I used:
session.connection().createStatement().execute("SHUTDOWN");
at the end of the app (just before closing the session) it worked fine, the script file was created, the log file dissapeared, and the data file contains actual data.

Could anybody please help me out with this? What am I doing wrong?
Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 07, 2008 6:09 pm 
Newbie

Joined: Thu Feb 07, 2008 5:48 pm
Posts: 1
jambalaya,

Are you calling session.close()?

Regards,

Tulio


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.