Java Code Examples for org.hsqldb.server.Server#start()

The following examples show how to use org.hsqldb.server.Server#start() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TestJDBCSavepoints.java    From evosql with Apache License 2.0 5 votes vote down vote up
protected void setUp() throws Exception {

        super.setUp();
        user     = "sa";
        password = "";
        stmt     = null;
        conn1    = null;
        conn2    = null;
        server   = new Server();

//        server = new WebServer();
        server.putPropertiesFromString(serverProps);
        server.start();

        try {
            Class.forName("org.hsqldb.jdbc.JDBCDriver");

            conn1 = DriverManager.getConnection(url, user, password);
            conn2 = DriverManager.getConnection(url, user, password);
            stmt  = conn1.createStatement();
        } catch (Exception e) {

            //e.printStackTrace();
            System.out.println(this + ".setUp() error: " + e.getMessage());
            throw e;
        }
    }
 
Example 2
Source File: DBCountPageView.java    From hadoop with Apache License 2.0 5 votes vote down vote up
private void startHsqldbServer() {
  server = new Server();
  server.setDatabasePath(0, 
      System.getProperty("test.build.data", "/tmp") + "/URLAccess");
  server.setDatabaseName(0, "URLAccess");
  server.start();
}
 
Example 3
Source File: MemoryDbHsql.java    From MegaSparkDiff with Apache License 2.0 5 votes vote down vote up
public void initializeMemoryDB()
{
    hsqlDbServer = new Server();
    hsqlDbServer.setDatabaseName(0, "testDb");
    hsqlDbServer.setDatabasePath(0, "mem:testDb");
    hsqlDbServer.setPort(9001); // this is the default port
    hsqlDbServer.setSilent(true);
    hsqlDbServer.start();
}
 
Example 4
Source File: DBCountPageView.java    From big-c with Apache License 2.0 5 votes vote down vote up
private void startHsqldbServer() {
  server = new Server();
  server.setDatabasePath(0, 
      System.getProperty("test.build.data", "/tmp") + "/URLAccess");
  server.setDatabaseName(0, "URLAccess");
  server.start();
}
 
Example 5
Source File: HsqldbLocalServer.java    From hadoop-mini-clusters with Apache License 2.0 5 votes vote down vote up
@Override
public void start() throws Exception {
    LOG.info("HSQLDB: Starting HSQLDB");
    configure();
    server = new Server();
    server.setProperties(hsqlProperties);
    server.start();
}
 
Example 6
Source File: JdbcCookbookTest.java    From java-client-api with Apache License 2.0 5 votes vote down vote up
private void setupHSQLDBServer() {
  hsqlDBServer = new Server();
  hsqlDBServer.setDatabaseName(0, "employees");
  hsqlDBServer.setDatabasePath(0, "mem:employees");
  hsqlDBServer.setPort(9002);
  hsqlDBServer.start();
}