Note that there are some explanatory texts on larger screens.

plurals
  1. POrun hsqldb from code suspend clients
    primarykey
    data
    text
    <p>Well, I need to create hsqldb in server mode and connect to this server from another client (f.e. from runManagerSwing.bat). Here are my code:</p> <pre><code> public static Server server = new Server(); public static void main(String[] args) throws IOException, ServerAcl.AclFormatException, SQLException { HsqlProperties p = new HsqlProperties(); p.setProperty("server.database.0", "file:./db/myHsqlDb"); p.setProperty("server.dbname.0", "idt_simulatordb"); p.setProperty("server.port", "9001"); server.setProperties(p); server.setSilent(false); server.setTrace(true); server.start(); (1) Connection conn = DriverManager.getConnection("jdbc:hsqldb:hsql://localhost:9001/idt_simulatordb", "sa", ""); Statement st = conn.createStatement(); String expression1 = "DROP SCHEMA IF EXISTS simulators CASCADE;\n"; String expression2 = "CREATE SCHEMA SIMULATORS AUTHORIZATION SA;"; String expression3 = "CREATE TABLE SIMULATORS.dirtyhack();"; String expression4 = "DROP SCHEMA IF EXISTS myschema CASCADE;\n"; String expression5 = "CREATE SCHEMA myschema AUTHORIZATION SA;"; st.executeUpdate(expression1); st.executeUpdate(expression2); st.executeUpdate(expression3); st.executeUpdate(expression4); st.executeUpdate(expression5); st.close(); conn.close(); (2)server.shutdown(); } </code></pre> <p>To check out that my server is fine I add line (1). And it's really ok. But I want to connect from another tool. To do so I put break point before (2) and start client runManagerSwing.bat. The client succsessfully finds server but suspend. Sometimes it wakeup if I make several step between line (1) and (2).</p> <ol> <li>Why does it happen? Maybe I have to launch server from another thread? How to do so?</li> <li>And second question. I want to clear up all hsqldb files after shutdown (even .properties and .script). Are there any preferences to do so or I have to delete it manually?</li> </ol> <p>p.s. sorry for my english</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload