There is a problem with this interesting approach if you use HSQL on a regular basis.
Before the sample worked for me, I needed to add some HSQL driver to the LibreOffice class path (Tools>Options>Advanced).
After adding some HSQL2 driver, any embedded database is converted to HSQL2 and next time I can’t open it anymore. In order to access my data, I’ve got to restore from backup or extract the embedded database and use it in file mode or server mode.
If I add some HSQL1 driver to the class path (for instance the one in the installation directory), LibreOffice can’t connect to HSQL2 anymore.