2 Replies Latest reply on Jul 12, 2003 6:20 PM by drej

    [newbie] Make Hypersonic write data to disk (default is in-m

    drej Newbie

      Hello,

      OS: Solaris ver. 8
      JBOSS: 3.2.0

      During my research I noticed that Hypersonic stores all data in memory by default, which IMHO is no good in a production environment. What if there is a h/w failure, or just a crash...all my data is lost? From what I understand, as you write to the DB, Hypersonic saves the data in a script file, but this gets very large, especially if storing bitblobs in the DB.

      From reading the Hypersonic docs, there is a connection url to enable disk-based storage, so I edited my server/default/deploy/hsqldb-ds.xml file to enable it as follows:

      connection-url>jdbc:hsqldb:hsql:.</connection-url>

      became

      connection-url>jdbc:hsqldb:hsql:/db/mydata</connection-url>

      When I do this and restart the server, Hypersonic seems to act the same. After adding a few small (4x15KB) pictures to the database, my mydata.script file becomes 11MB because it's all plain text! My mydata.data file, which I assume should hold the compressed binary data is 0KB.

      From the Hypersonic docs, it seems that if you wish to force disk-based used, your CREATE TABLE statements must instead be CREATED CACHED TABLE. Can anyone help me out to determine where I can find and change this mapping?

      Thanks!
      Andrej

      P.S. - as a default setting, wouldn't it be better to have hypersonic as disk-based for JBOSS...mebe jes me.