Hyper SQL DB (or HSQLDB for short) is a great java-based database system that performs exceptionally well, even though just consuming a few hundred KB. It is very convenient for integration testing and has loads of useful modes to work with. One of the modes that are suitable for light testing in development is the file mode, where persistance basically just works by writing
INSERT statements to a script file. Unfortunately, this mode gave me a lot of unexpected grief due to not persisting data, and I am certainly not the only one (link1).
To get it working I just needed to add the following to the connection url: «hsqldb.write_delay=false;»
Beware: this only works on HSQL versions >= 2.0
The relevant part of my hibernate.cfg.xml now looked like this:
<property name="connection.url"> jdbc:hsqldb:file:data/logtestdb;hsqldb.write_delay=false; </property>
Other people have come up with other solutions, so if this does not work for you, then do check their work out