Examples of HsqlProperties


Examples of org.hsqldb.persist.HsqlProperties

            // 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));
            server.setProperties(new HsqlProperties(properties));

            // get the port
            port = server.getPort();

            // get the Address
View Full Code Here

Examples of org.hsqldb.persist.HsqlProperties

    }

    public void afterPropertiesSet() throws Exception {


        HsqlProperties configProps = new HsqlProperties(serverProperties);
        if (configProps == null) {
            configProps = new HsqlProperties();
        }

        ServerConfiguration.translateDefaultDatabaseProperty(configProps);

        // finished setting up properties - set some important behaviors as well;
View Full Code Here

Examples of org.hsqldb.persist.HsqlProperties

            // 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));
            server.setProperties(new HsqlProperties(properties));

            // get the port
            port = server.getPort();

            // get the Address
View Full Code Here

Examples of org.hsqldb.persist.HsqlProperties

      }

      log.debug("starting " + config.getDatabaseName() + " in-VM");

      String url = config.getDatabaseConnectionURL();
      HsqlProperties props = new HsqlProperties();
      props.setProperty("server.database.0", ServiceContainerConfiguration.getHypersonicDatabase(url));
      props.setProperty("server.dbname.0", ServiceContainerConfiguration.getHypersonicDbname(url));
      props.setProperty("server.trace", "false");
      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();
View Full Code Here

Examples of org.hsqldb.persist.HsqlProperties

     */
    public static void main(String[] args) {

        String propsPath =
            FileUtil.getDefaultInstance().canonicalOrAbsolutePath("webserver");
        HsqlProperties fileProps =
            ServerConfiguration.getPropertiesFromFile(propsPath);
        HsqlProperties props = fileProps == null ? new HsqlProperties()
                                                 : fileProps;
        HsqlProperties stringProps = null;
        try {
            stringProps = HsqlProperties.argArrayToProps(args,
                    ServerConstants.SC_KEY_PREFIX);
        } catch (ArrayIndexOutOfBoundsException aioob) {
            // I'd like to exit with 0 here, but it's possible that user
            // has called main() programmatically and does not want us to
            // exit.
            printHelp("webserver.help");
            return;
        }

        if (stringProps != null) {
            if (stringProps.getErrorKeys().length != 0) {
                printHelp("webserver.help");

                return;
            }

View Full Code Here

Examples of org.hsqldb.persist.HsqlProperties

    }

    public static void main(String[] argv) {

        TestCacheSize  test  = new TestCacheSize();
        HsqlProperties props = HsqlProperties.argArrayToProps(argv, "test");

        test.bigops   = props.getIntegerProperty("test.bigops", test.bigops);
        test.bigrows  = test.bigops;
        test.smallops = test.bigops / 8;
        test.cacheScale = props.getIntegerProperty("test.scale",
                test.cacheScale);
        test.logType   = props.getProperty("test.logtype", test.logType);
        test.tableType = props.getProperty("test.tabletype", test.tableType);
        test.nioMode   = props.isPropertyTrue("test.nio", test.nioMode);

        if (props.getProperty("test.dbtype", "").equals("mem")) {
            test.filepath = "mem:test";
            test.filedb   = false;
            test.shutdown = false;
        }
View Full Code Here

Examples of org.hsqldb.persist.HsqlProperties

     */
    public static void main(String[] args) {

        String propsPath =
            FileUtil.getDefaultInstance().canonicalOrAbsolutePath("server");
        HsqlProperties fileProps =
            ServerConfiguration.getPropertiesFromFile(propsPath);
        HsqlProperties props = fileProps == null ? new HsqlProperties()
                                                 : fileProps;
        HsqlProperties stringProps = null;
        try {
            stringProps = HsqlProperties.argArrayToProps(args,
                    ServerConstants.SC_KEY_PREFIX);
        } catch (ArrayIndexOutOfBoundsException aioob) {
            // I'd like to exit with 0 here, but it's possible that user
            // has called main() programmatically and does not want us to
            // exit.
            printHelp("server.help");
            return;
        }

        if (stringProps != null) {
            if (stringProps.getErrorKeys().length != 0) {
                printHelp("server.help");

                return;
            }

View Full Code Here

Examples of org.hsqldb.persist.HsqlProperties

            throw new RuntimeException();
        }

        path = FileUtil.getDefaultInstance().canonicalOrAbsolutePath(path);

        HsqlProperties p = ServerConfiguration.getPropertiesFromFile(path);

        if (p == null || p.isEmpty()) {
            return false;
        }

        printWithThread("putPropertiesFromFile(): [" + path + ".properties]");
View Full Code Here

Examples of org.hsqldb.persist.HsqlProperties

            return;
        }

        printWithThread("putPropertiesFromString(): [" + s + "]");

        HsqlProperties p = HsqlProperties.delimitedArgPairsToProps(s, "=",
            ";", ServerConstants.SC_KEY_PREFIX);

        try {
            setProperties(p);
        } catch (Exception e) {
View Full Code Here

Examples of org.hsqldb.persist.HsqlProperties

            setServerError(e);

            throw e;
        }

        HsqlProperties newprops = DatabaseURL.parseURL(filepath, false);

        if (newprops == null) {
            RuntimeException e = new RuntimeException("invalid database path");

            printError("invalid database path");
            setServerError(e);

            throw e;
        }

        String path = newprops.getProperty("database");
        String type = newprops.getProperty("connection_type");

        try {
            int dbid = DatabaseManager.getDatabase(type, path, this, newprops);

            dbID[i]    = dbid;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.