HSQLDB:.script 文件在并行执行多个项目[多线程环境] 期间自动删除?
HSQLDB : .script file is automatically getting deleted during multiple project execution[multithreaded environment] in parallel?
我在多线程 java 环境中使用 HSQLDB 基于文件的数据库版本 2.5.0,其中许多项目可以 read/write/update 单个数据库中的 2 个表。我们观察到,在启动项目几分钟后,保存数据的 .script 文件被自动删除并且数据被擦除。以下是配置,
Properties props = new Properties();
props.put("user", userName);
props.put("password", password);
props.put("jdbc.strict_md", "false");
props.put("jdbc.get_column_name", getColumnName);
props.put("shutdown", "true");
props.put("hsqldb.write_delay_millis", "0");
props.put("hsqldb.tx", "MVCC");
connection = DriverManager.getConnection("jdbc:hsqldb:file:" + instantURL + databaseName, props);
用户名、密码、实例 URL、数据库只是占位符,是从环境中的属性文件中读取的。任何人都可以建议,如果这里看起来不太好或需要更改配置?如果需要更多信息,请随时询问?谢谢。
进程内文件:如果项目是单独的进程,则数据库无法在"many projects can read/write/update the 2 tables in single database"的情况下使用。
如果项目都在同一个进程中,那么这种访问方式是允许的。最好避免 ("shutdown", "true")
您可以为以下场景配置和启动 HSQLDB 服务器:http://hsqldb.org/doc/2.0/guide/listeners-chapt.html
我在多线程 java 环境中使用 HSQLDB 基于文件的数据库版本 2.5.0,其中许多项目可以 read/write/update 单个数据库中的 2 个表。我们观察到,在启动项目几分钟后,保存数据的 .script 文件被自动删除并且数据被擦除。以下是配置,
Properties props = new Properties();
props.put("user", userName);
props.put("password", password);
props.put("jdbc.strict_md", "false");
props.put("jdbc.get_column_name", getColumnName);
props.put("shutdown", "true");
props.put("hsqldb.write_delay_millis", "0");
props.put("hsqldb.tx", "MVCC");
connection = DriverManager.getConnection("jdbc:hsqldb:file:" + instantURL + databaseName, props);
用户名、密码、实例 URL、数据库只是占位符,是从环境中的属性文件中读取的。任何人都可以建议,如果这里看起来不太好或需要更改配置?如果需要更多信息,请随时询问?谢谢。
进程内文件:如果项目是单独的进程,则数据库无法在"many projects can read/write/update the 2 tables in single database"的情况下使用。
如果项目都在同一个进程中,那么这种访问方式是允许的。最好避免 ("shutdown", "true")
您可以为以下场景配置和启动 HSQLDB 服务器:http://hsqldb.org/doc/2.0/guide/listeners-chapt.html