Package org.hsqldb.persist

Examples of org.hsqldb.persist.HsqlProperties


      }

      log.debug("starting " + config.getDatabaseType() + " 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


        Iterator       tables;
        Table          table;
        DITableInfo    ti;
        int[]          cols;
        Object[]       row;
        HsqlProperties p;

        // Column number mappings
        final int iscope          = 0;
        final int icolumn_name    = 1;
        final int idata_type      = 2;
View Full Code Here

        Table          table;
        Object[]       row;
        Constraint     constraint;
        int[]          cols;
        int            colCount;
        HsqlProperties p;

        // column number mappings
        final int itable_cat   = 0;
        final int itable_schem = 1;
        final int itable_name  = 2;
View Full Code Here

    private HsqlServerFactory() {}

    public static HsqlSocketRequestHandler createHsqlServer(String dbFilePath,
            boolean debugMessages, boolean silentMode) throws SQLException {

        HsqlProperties props = new HsqlProperties();

        props.setProperty("server.database.0", dbFilePath);
        props.setProperty("server.trace", debugMessages);
        props.setProperty("server.silent", silentMode);

        Server server = new Server();

        try {
            server.setProperties(props);
View Full Code Here

            throw new RuntimeException();
        }

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

        HsqlProperties p = ServerConfiguration.getPropertiesFromFile(
            ServerConstants.SC_PROTOCOL_HSQL, path);

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

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

            return;
        }

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

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

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

                throw e;
            }
        }

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

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

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

            throw e;
        }

        String path = newprops.getProperty(DatabaseURL.url_database);
        String type = newprops.getProperty(DatabaseURL.url_connection_type);

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

            dbID[i]             = dbid;
View Full Code Here

                                + dbNumberMap.get(dbNumber));

                continue;
            }

            HsqlProperties dbURL = DatabaseURL.parseURL(path, false, false);

            if (dbURL == null) {
                printWithThread("malformed database path: " + path);

                continue;
            }

            dbAlias[i] = (String) dbNumberMap.get(dbNumber);
            dbPath[i= dbURL.getProperty("database");
            dbType[i= dbURL.getProperty("connection_type");
            dbProps[i] = dbURL;

            i++;
        }
    }
View Full Code Here

            ServerConstants.SC_PROTOCOL_HSQL, propsPath);
        ServerProperties props =
            fileProps == null
            ? new ServerProperties(ServerConstants.SC_PROTOCOL_HSQL)
            : fileProps;
        HsqlProperties stringProps = null;

        stringProps = HsqlProperties.argArrayToProps(args,
                ServerConstants.SC_KEY_PREFIX);

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

            return;
        }
View Full Code Here

//#endif JAVA6
    public static Connection getConnection(String url,
            Properties info) throws SQLException {

        final HsqlProperties props = DatabaseURL.parseURL(url, true, false);

        if (props == null) {

            // supposed to be an HSQLDB driver url but has errors
            throw Util.invalidArgument();
        } else if (props.isEmpty()) {

            // is not an HSQLDB driver url
            return null;
        }
        props.addProperties(info);

        long timeout = DriverManager.getLoginTimeout();

        if (timeout == 0) {

            // no timeout restriction
            return new JDBCConnection(props);
        }

        String connType = props.getProperty("connection_type");

        if (DatabaseURL.isInProcessDatabaseType(connType)) {
            return new JDBCConnection(props);
        }
View Full Code Here

TOP

Related Classes of org.hsqldb.persist.HsqlProperties

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.