Malayalam Favorites

Sunday, November 16, 2008

hbm2ddl not commiting on HSQLDB

Just noticed that the hbm2ddl ant task does not commit on HSQLDB. I am using hibernate 3.3 and with the sable set of hibernate-tools. It turned out to be a "change" (bug?) in Hypersonic SQL's behavior starting from 1.7.1; I'm using 1.9;
and can be fixed or worked around by telling Hibernate (not HSQL ) to shutdown.

The problem seems too be that prior to 1.7.1, hypersonic used to shutdown and flush the memory to disk if no more connections to the db existed. But now it does not do that; and the result is that by the time the hypersonic JVM terminates, it still hasn't written the schema to disk, unless you told it to do so before terminating.

Setting the property hibernate.connection.shutdown=true will make Hibernate tell HSQL db to flush after it gives up a connection.

No comments: