HSQLDB inmemory mode doesn't delete files on shutdown

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

HSQLDB inmemory mode doesn't delete files on shutdown

Boris Michalko
I'm using HSQLDB version 2.2.9 for testing purposes. When I create named in memory database, files aren't deleted after calling shutdown function. On my filesystem I have folder DBname.tmp and files DBname.lck, DBname.log, DBname.properties and DBname.script. As I understand documentation (http://hsqldb.org/doc/2.0/guide/dbproperties-chapt.html#dpc_connection_url) it shouldn't happened.
For testing I'm using the following code:


import java.io.IOException;
import org.hsqldb.Server;
import org.hsqldb.persist.HsqlProperties;
import org.hsqldb.server.ServerAcl.AclFormatException;
import org.junit.Test;

public class HSQLDBInMemTest {

@Test
public void test() throws IOException, AclFormatException {
HsqlProperties props = new HsqlProperties();
props.setProperty("server.database.0", "test1");
props.setProperty("server.dbname.0", "test1");

props.setProperty("server.database.1", "test2");
props.setProperty("server.dbname.1", "test2");
Server hsqlServer = new Server();
hsqlServer.setRestartOnShutdown(false);
hsqlServer.setNoSystemExit(true);
hsqlServer.setProperties(props);
hsqlServer.start();
hsqlServer.shutdown();
}
}

I asked this question originally here: http://stackoverflow.com/questions/16694067/hsqldb-inmemory-mode-doesnt-delete-files-on-shutdown

------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
Hsqldb-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/hsqldb-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: HSQLDB inmemory mode doesn't delete files on shutdown

Fred Toussi-2
You have set up two file databases in your server. The path for a memory
database looks like this

props.setProperty("server.database.0", "mem:test1");

Fred

On Wed, May 22, 2013, at 15:28, Boris Michalko wrote:

> I'm using HSQLDB version 2.2.9 for testing purposes. When I create named
> in memory database, files aren't deleted after calling shutdown function.
> On my filesystem I have folder DBname.tmp and files DBname.lck,
> DBname.log, DBname.properties and DBname.script. As I understand
> documentation
> (http://hsqldb.org/doc/2.0/guide/dbproperties-chapt.html#dpc_connection_url)
> it shouldn't happened.
> For testing I'm using the following code:
>
>
> import java.io.IOException;
> import org.hsqldb.Server;
> import org.hsqldb.persist.HsqlProperties;
> import org.hsqldb.server.ServerAcl.AclFormatException;
> import org.junit.Test;
>
> public class HSQLDBInMemTest {
>
> @Test
> public void test() throws IOException, AclFormatException {
> HsqlProperties props = new HsqlProperties();
> props.setProperty("server.database.0", "test1");
> props.setProperty("server.dbname.0", "test1");
>
> props.setProperty("server.database.1", "test2");
> props.setProperty("server.dbname.1", "test2");
> Server hsqlServer = new Server();
> hsqlServer.setRestartOnShutdown(false);
> hsqlServer.setNoSystemExit(true);
> hsqlServer.setProperties(props);
> hsqlServer.start();
> hsqlServer.shutdown();
> }
> }
>
> I asked this question originally here:
> http://stackoverflow.com/questions/16694067/hsqldb-inmemory-mode-doesnt-delete-files-on-shutdown
>
> ------------------------------------------------------------------------------
> Try New Relic Now & We'll Send You this Cool Shirt
> New Relic is the only SaaS-based application performance monitoring
> service
> that delivers powerful full stack analytics. Optimize and monitor your
> browser, app, & servers with just a few lines of code. Try New Relic
> and get this awesome Nerd Life shirt!
> http://p.sf.net/sfu/newrelic_d2d_may
> _______________________________________________
> Hsqldb-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/hsqldb-user

------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
Hsqldb-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/hsqldb-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: HSQLDB inmemory mode doesn't delete files on shutdown

Boris Michalko
Thank you! It works as I wanted to.

Boris


----- Original Message -----
From: Fred Toussi <[hidden email]>
To: "[hidden email]" <[hidden email]>
Cc:
Sent: Wednesday, May 22, 2013 6:28 PM
Subject: Re: [Hsqldb-user] HSQLDB inmemory mode doesn't delete files on shutdown

You have set up two file databases in your server. The path for a memory
database looks like this

props.setProperty("server.database.0", "mem:test1");

Fred

On Wed, May 22, 2013, at 15:28, Boris Michalko wrote:

> I'm using HSQLDB version 2.2.9 for testing purposes. When I create named
> in memory database, files aren't deleted after calling shutdown function.
> On my filesystem I have folder DBname.tmp and files DBname.lck,
> DBname.log, DBname.properties and DBname.script. As I understand
> documentation
> (http://hsqldb.org/doc/2.0/guide/dbproperties-chapt.html#dpc_connection_url)
> it shouldn't happened.
> For testing I'm using the following code:
>
>
> import java.io.IOException;
> import org.hsqldb.Server;
> import org.hsqldb.persist.HsqlProperties;
> import org.hsqldb.server.ServerAcl.AclFormatException;
> import org.junit.Test;
>
> public class HSQLDBInMemTest {
>
> @Test
> public void test() throws IOException, AclFormatException {
> HsqlProperties props = new HsqlProperties();
> props.setProperty("server.database.0", "test1");
> props.setProperty("server.dbname.0", "test1");
>
> props.setProperty("server.database.1", "test2");
> props.setProperty("server.dbname.1", "test2");
> Server hsqlServer = new Server();
> hsqlServer.setRestartOnShutdown(false);
> hsqlServer.setNoSystemExit(true);
> hsqlServer.setProperties(props);
> hsqlServer.start();
> hsqlServer.shutdown();
> }
> }
>
> I asked this question originally here:
> http://stackoverflow.com/questions/16694067/hsqldb-inmemory-mode-doesnt-delete-files-on-shutdown
>
> ------------------------------------------------------------------------------
> Try New Relic Now & We'll Send You this Cool Shirt
> New Relic is the only SaaS-based application performance monitoring
> service
> that delivers powerful full stack analytics. Optimize and monitor your
> browser, app, & servers with just a few lines of code. Try New Relic
> and get this awesome Nerd Life shirt!
> http://p.sf.net/sfu/newrelic_d2d_may
> _______________________________________________
> Hsqldb-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/hsqldb-user

------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
Hsqldb-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/hsqldb-user


------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
Hsqldb-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/hsqldb-user
Loading...