I have created a MEMORY table in HSQL. But the data is saved and accessed only in the running of my Java application.In HSql FAQ they said that,
...the default, MEMORY tables are persistent.
The data is not persistent after the program exists. What is the problem here?
SQL:
CREATE MEMORY TABLE SESSIONS(
SESSION_DATE DATE NOT NULL,
IN_TIME TIMESTAMP NOT NULL,
OUT_TIME TIMESTAMP NOT NULL)
Java :
DriverManager.getConnection("jdbc:hsqldb:file:"+
DbConnection.class.getResource("/loginTimerDB").getPath()+"/loginTimerDB",
"SA",
"");
I have placed this database file within java packages to make a simple jar file while deploying.
Ok. at first I have the same thought about packing database in jar file. so I have moved that hsql database folder, to out side of the source packages. And, I have changed the java code like below,
"jdbc:hsqldb:file:loginTimerDB/loginTimerDB"
I have previously worked with hsql db, and never had a problem like this.