【发布时间】:2012-04-24 17:50:52
【问题描述】:
我像这样启动一个 hsqldb 1.8 服务器:
java -cp "%classpath%;.;Y:\PlantOperations\bldPlantOperations\code\lib\jboss\hsqldb-1.8.0-10.jar;C:\Documents and Settings\BThirup\Application Data\Rockwell Automation \FactoryTalk ProductionCentre\ProcessDesigner\hsqldb-1.8.0-10.jar;C:\Documents and Settings\BThirup\Application Data\Rockwell Automation\FactoryTalk ProductionCentre\ShopOperation\hsqldb-1.8.0-10.jar;" org.hsqldb.Server -database.0 文件:"C:\Documents and Settings\BThirup\Application Data\Rockwell Automation\FactoryTalk ProductionCentre\logs\ApplicationLog\mydb" -dbname.0 xdb
我有多个使用 jdbc:hsqldb:hsql://localhost/xdb;shutdown=true 连接的客户端(无特定顺序)
当没有更多客户端连接时,我想关闭 Hsqldb 服务器。
我在文档中读到,在 jdbc url 中添加 shutdown=true 会导致 hsqldb 在没有更多客户端连接后关闭。但我没有看到这种情况发生。
我也试过了
Properties info = new Properties();
info.put("user", "SA");
info.put("password", "");
info.put("shutdown", "true");
conn = DriverManager.getConnection(dbString, info);
上述也不会导致 hsqldb 服务器在最后一个客户端断开连接后关闭。
对此的任何帮助表示赞赏
巴拉
【问题讨论】: