By default, Corda store their data in an H2 database.
The database (a file called
persistence.mv.db) is created when the node first starts up.
Let’s take an example — https://github.com/corda/LetterOfCredit
We are not going to talk about the CORDA implementation here, we are going to see how the data has been stored by default.
LetterOfCredit application has few modules
Let’s take the Notary Pool and see how the data are in H2 (by default)
By default, it has an administrator user
saand a blank password. The database password is required only when the H2 database is exposed on non-localhost address (which is disabled by default).
Lets say the application is deployed and is running in the portal.
- Download the last stable h2 platform-independent zip, unzip the zip, and navigate in a terminal window to the unzipped folder
- Change directories to the bin folder:
- Run the following command to open the h2 web console in a web browser tab:
Identify the persistence.mv.db file,
The command to start the H2 console,
java -jar h2–1.4.197.jar -webAllowOthers -tcpAllowOthers
Use the jdbc URL,
Once connected, the tables can be viewed,
That’s it.. Lets rock Blockchain Database guys!!!
Next article we can see about Nodes configured to use PostgreSQL.