2 Replies Latest reply on Nov 17, 2003 4:50 PM by gregorypierce

    Default Hypersonic doesn't write to disk? Why not?

      I have been playing around with the latest version of JBoss (been a way for a while - one of the prodigal children has returned:) ). However it appears that by default, there really isn't much of a persistence engine in place as a restart of JBoss blows away anything that you were 'persisting' using the DefaultDS.

      So my question - shouldn't the out of the box configuration actually preserve data between restarts of JBoss? This isn't due to any production use or anything, but if someone wants to really play around with CMP, it really sucks to restart the server and then have all of your data lost.

      But maybe its just me :)

        • 1. Re: Default Hypersonic doesn't write to disk? Why not?

          I solved my problem - by moving to MySQL. But I will find the mechanism to post a bug about this. On OSX and RedHat 9, the configuration for DefaultDS was not actually storing data in the database on JBoss shutdown (of the ctrl-c variety - and JBoss does go through its shutdown cycle). While JBoss was running, all of the data was in the database, and as soon as it was restarted it was all gone. I confirmed that the URL for hsql was correct and I actually saw the localDB files in the directories, but a quick look at DBVisualizer showed me that the table are getting truncated by something somewhere.

          • 2. Re: Default Hypersonic doesn't write to disk? Why not?

            I also discovered what the root of the problem was. While using XDoclet someone (probably me) set the jboss.persistence to:

            * @jboss.persistence
            * create-table="true"
            * remove-table="true"
            * pk-constraint="true"
            * table-name="lobby"

            Which was causing the persistence manager to trunc tables. It wasn't for mysql because I forgot to grant that permission. Setting the jboss.persistence xdoclet information to:

            * @jboss.persistence
            * create-table="true"
            * remove-table="false"
            * pk-constraint="true"
            * table-name="lobby"

            solved the problem.