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.
|