Announcement Announcement Module
No announcement yet.
HYPERSONIC_PERSISTENT data persistent problem Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • HYPERSONIC_PERSISTENT data persistent problem

    Hi all.
    I would like to keep my data on Hypersonic. So, I ran a command as below on ROO shell.

    persistence setup --provider HIBERNATE --database HYPERSONIC_PERSISTENT

    In my home directory, as a result, some files(such as log and script) was made so I expected that there was rows which I added through web even though server was restarted. But there was no row after restring the server.

    HYPERSONIC document describes as following.

    Memory tables are the default type when the CREATE TABLE command is used. Their data is held entirely in memory but any change to their structure or contents is written to the *.log and *.script files. The *.script file and the *.log file are read the next time the database is opened, and the MEMORY tables are recreated with all their contents.

    However, I saw that *.log or *.script file was reset when server was restarted. Now, I don`t know whether this is a problem of ROO.

  • #2
    The default configuration sets hibernate to recreate the database structure at startup which means nothing is retained. Update the hibernate configuration.


    • #3
      Martin means that you should change this line in persistence.xml:

      <property name="" value="create"/>
      To this:

      <property name="" value="update"/>
      Note that although you will keep your data, your schema will no longer be kept 100% in synch with the the JPA annotations in your code; for example we found that things like indexes were only created in "create" mode, not "update" mode.


      • #4
        Thanks a lot. I resolved this problem by advice.