Package org.hsqldb

Examples of org.hsqldb.Server$ServerThread


      props.setProperty("server.silent", "true");
      props.setProperty("server.no_system_exit", "true");
      props.setProperty("server.port", 27862);
      props.setProperty("server.address", ipAddressOrHostName);

      hsqldbServer = new Server();
      hsqldbServer.setLogWriter(null);
      hsqldbServer.setProperties(props);
      hsqldbServer.start();

      log.debug("started " + config.getDatabaseName() + " in-VM");
View Full Code Here


        if (isNetwork) {
            if (url == null) {
                url = "jdbc:hsqldb:hsql://localhost/test";
            }

            server = new Server();

            server.setDatabaseName(0, "test");
            server.setDatabasePath(0, "mem:test;sql.enforce_strict_size=true");
            server.setLogWriter(null);
            server.setErrWriter(null);
View Full Code Here

    /**
     * @see org.apache.avalon.framework.activity.Initializable#initialize()
     */
    public void initialize() throws Exception
    {
        this.server = new Server();
        this.server.setProperties( this.serverProperties );
    }
View Full Code Here

      props.setProperty("server.silent", "true");
      props.setProperty("server.no_system_exit", "true");
      props.setProperty("server.port", 27862);
      props.setProperty("server.address", ipAddressOrHostName);

      hsqldbServer = new Server();
      hsqldbServer.setLogWriter(null);
      hsqldbServer.setProperties(props);
      hsqldbServer.start();

      log.debug("started " + config.getDatabaseName() + " in-VM");
View Full Code Here

      props.setProperty("server.silent", "true");
      props.setProperty("server.no_system_exit", "true");
      props.setProperty("server.port", 27862);
      props.setProperty("server.address", ipAddressOrHostName);

      hsqldbServer = new Server();
      hsqldbServer.setLogWriter(null);
      hsqldbServer.setProperties(props);
      hsqldbServer.start();

      log.debug("started " + config.getDatabaseName() + " in-VM");
View Full Code Here

      props.setProperty("server.silent", "true");
      props.setProperty("server.no_system_exit", "true");
      props.setProperty("server.port", 27862);
      props.setProperty("server.address", ipAddressOrHostName);
     
      hsqldbServer = new Server();
      hsqldbServer.setLogWriter(null);
      hsqldbServer.setProperties(props);
      hsqldbServer.start();
     
      log.debug("started " + config.getDatabaseName() + " in-VM");
View Full Code Here

   */
  public static Object startHsqldb(final String databaseFile,
      final String databaseName) throws Exception
  {
    // Start DB in new thread, or else it will block us
    final Server server = new Server();
    Thread serverThread = new Thread(THREAD_NAME) {
      public void run() {
        try {
          // Start server
          Logger targetLogger = Logger.getLogger( "org.hsqldb" );
          server.setLogWriter( new PrintWriter(
              new StdOut2Log4jFilter( server.getLogWriter(), log, targetLogger.getEffectiveLevel() )) );
          server.setDatabasePath( 0, databaseFile );
          server.setDatabaseName( 0, databaseName );
          server.setNoSystemExit( true );
          server.setSilent( true );
          server.start();
        } catch (Exception e) {
          log.error( e );
        }
        //log.error("Failed to start database", e);
      }
View Full Code Here

   * @throws Exception
   */
  public static void stopHsqldb(final Object serverObject) throws Exception {
    if ((serverObject != null) && (serverObject instanceof Server))
    {
      final Server server = (Server)serverObject;
      server.shutdown() ;
    }
  }
View Full Code Here

                }
            } catch (NameNotFoundException e) {
            }

            // create the server
            server = new Server();
            // add the silent property
            properties.setProperty(ServerConstants.SC_KEY_SILENT, "true");
            // set the log and error writers
            server.setLogWriter(new HsqlPrintWriter(false));
            server.setErrWriter(new HsqlPrintWriter(true));
View Full Code Here

        url = "jdbc:hsqldb:hsql://localhost:" + port + "/" + databaseName;
        logger.info("Starting Hypersonic Database '" + url + "'.");
        new Thread() {
            public void run() {
                Server server = new Server();
                server.setDatabasePath(0, "target/hsql/" + databaseName);
                server.setDatabaseName(0, databaseName);
                server.setNoSystemExit( true );
                server.setSilent( true );
                server.setPort(port);
                server.start();
                hsqlServer = server;
            }
        }.start();
        while(hsqlServer == null) {
            Thread.sleep(50);
View Full Code Here

TOP

Related Classes of org.hsqldb.Server$ServerThread

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.