I am using HSQLDB 2.2.9 and run a standalone HSQLDB server. The server property "server.remote_open" is set to true.
The server has access to a database in the directory "C:/db/20121022/test_db" which is not defined in the server properties and has no alias assigned.
Now I am trying to access the database from remote using the (invalid, wrong path) connection string
The database doesn't exist, the error message "Database does not exists" occurs. That seems to be ok.
But if I access the right database using the connection string
"jdbc:hsqldb:hsql://host:3344;file:C:/db/20121022/test_db;create=false" (which works fine) and try afterwards again to connect to the non existing database using the connection string
"jdbc:hsqldb:hsql://host:3344;file:C:/db/20121024/test_db;create=false" there occurs no error but the second attempt simply returns a connection to the database found in the path "C:/db/20121022/test_db".
Is there something wrong with my connection string or have I missunderstood the "server.remote_open" property?
When you connect to the right database, a server starts listening on //host:3344// .When you connect the second time to this host's url, the db path in the URL is ignored because there is a server running. The connection is made to the server on the URL.
Remote open means if there is no server on the URL, then create the server with the given database file, otherwise ignore the database file path and connect to the existing server. It is working as it is supposed to do.
Great, thank you for the clarification.