About Me

Monday, May 11, 2015

H2 database in WSO2 products.

H2 is open source and free to distribute. Therefore WSO2 product has selected H2 as the default embedded database. All WSO2 products use embedded H2 databases to store application data in default distribution.

This embedded database can be corrupted due to various reasons including failed file locking at the concurrent access (http://www.h2database.com/html/features.html#database_file_locking), kill Java process to shut down the server, low disc space ..etc.

WSO2 highly recommend to use standard production ready database like MySQL, Oracle, PostgreSQL ..etc for production/Dev/QA deployment rather using embedded H2 database(s).

The registry database has three logical partition called , local, config and governance. You can only use the default embedded H2 database only for the local registry.

In local registry we store mount configurations, if the local registry is corrupted we can simply delete default embedded H2 database and restart the server with -Dsetup parameter. Then new database will be created and mount configuration will populate automatically.