H2 Database on Cronapp

-2

I received the following message when trying to publish the application to CronApp: "Your project uses an H2 database, and the data that is persisted in this type of database may be lost due to the distributed and cloudless state of the architecture. How can I create another type of database?

    
asked by anonymous 03.02.2017 / 13:51

1 answer

0

The CronApp development environment uses the H2 type database, which uses memory for disk storage. The containers where applications are published in CronApp do not have disk storage.

In this way, when your application is published, you can even use H2 bank and everything will work including the recording and reading of data, however when stopping the application the container will be turned off, and when it is started again, the data will have disappeared because they were only in memory of the initial container, which was turned off. To create a database in the cloud using CronApp IDE follow the steps:

  • Click Data Source (opens the tab)
  • Click the
  • Click the link
  • You are redirected to the console that displays the list of banks available
  • Click the [+] button to add
  • Enter the name of the new database
  • The name of the created bank will appear in the list
  • Return to the Data Source tab by clicking on it
  • Select from the list of databases in the cloud the name of the created bank
  • Clicking on
  • Database is created and appears in the list of  project
  • Note that in addition to creating the database in the cloud, you need to fine-tune your application to use the new data source you created. If you are using the persistence layer generation mechanism through the diagram, enter the diagram and change the data source by selecting from the available list the new data source that corresponds to your database in the newly created cloud. You will find more information at: link

        
    03.02.2017 / 14:32