Introduction

When you are developing software for Liferay 7, you will be forced to choose a database on your first startup of the system. Available are options like MySQL or the built-in embedded Hypersonic database, which you should never ever use in a production environment. Still, some developers are selecting the later option for development, because they don’t want to install or maintain an additional database on their system.

The obstacle

Most of them will get to a point where it is inevitable to query the embedded Hypersonic database. As far as we know this is only possible with a special read-only flag. Also we made the experience that you will have to reconnect to the database to see if any changes have happened, because executing the query a second time will not refresh the data 🙁

Here is the JDBC-config for reading the Hypersonic database:

jdbc:hsqldb:file:/Users/kwozniak/software/liferay-ce-portal-7.0-ga2/data/hypersonic/lportal;readonly=true

Please note the attached ;readonly=true flag.