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: H2 database lock file not removed
PostPosted: Wed Apr 10, 2013 6:01 am 
Newbie

Joined: Wed Apr 10, 2013 5:46 am
Posts: 2
Hello,

I am trying to generate a h2 database file from my application. The file may be re-generated multiple times within the same process. Therefore I am creating a new session factory instance for every export. The problem is, that the h2 database lock file is not released when I close the session factory. Therefore I have problems moving and renaming the file. Since I can't move the file, the data is exported in the same h2 databse multiple times.

How can I release the h2 database lock file without killing the process?
Is this a bug in the h2 driver implementation?
I would expect a proper resource cleanup, which also cleans up the lock file. The session factory interface definition for the close method states: Destroy this SessionFactory and release all resources (caches, connection pools, etc).

Thanks for any advice.


Top
 Profile  
 
 Post subject: Re: H2 database lock file not removed
PostPosted: Wed Apr 10, 2013 10:04 am 
Newbie

Joined: Wed Apr 10, 2013 5:46 am
Posts: 2
Hi,

I think its because the hibernate connection pool does not close the connection, but just returns it to the pool.

How can I get the underlying JDBC connection to forcibly close it?
I have tried to set the hibernate.pool_size to 0, but this also did not close the connection after I closed both, the session and its session factory.

Thanks.


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.