Examples of ConnectionInfo


Examples of org.h2.engine.ConnectionInfo

    /**
     * INTERNAL
     */
    public JdbcConnection(String url, Properties info) throws SQLException {
        this(new ConnectionInfo(url, info), true);
    }
View Full Code Here

Examples of org.h2.server.web.ConnectionInfo

                }
                found = true;
                data = d;
            }
            if (found) {
                ConnectionInfo info = new ConnectionInfo(data);
                url = info.url;
                user = info.user;
                driver = info.driver;
            }
        } catch (IOException e) {
View Full Code Here

Examples of org.jitterbit.integration.server.implementation.webservice.interchange.connection.client.ConnectionInfo

            }
            keys.add(property.getServerKeyName());
            values.add(sValue);
        }

        ConnectionInfo ci = new ConnectionInfo();
        ci.setKeys(keys.toArray(new String[keys.size()]));
        ci.setKeyValues(values.toArray(new String[values.size()]));
        return ci;
    }
View Full Code Here

Examples of org.lealone.engine.ConnectionInfo

                    filePasswordHash = (byte[]) info.get(key);
                else
                    prop.setProperty(key, info.getProperty(key));

            }
            ConnectionInfo ci = new ConnectionInfo(url, prop);
            ci.setUserPasswordHash(userPasswordHash);
            ci.setFilePasswordHash(filePasswordHash);
            sr = (SessionRemote) new SessionRemote(ci).connectEmbeddedOrServer(false);
        }

        return sr;
    }
View Full Code Here

Examples of org.lealone.engine.ConnectionInfo

        if (baseDir == null) {
            baseDir = SysProperties.getBaseDir();
        }

        dbName = server.checkKeyAndGetDatabaseName(dbName);
        ConnectionInfo ci = new CBaseConnectionInfo(originalURL, dbName);

        if (baseDir != null) {
            ci.setBaseDir(baseDir);
        }
        if (server.getIfExists()) {
            ci.setProperty("IFEXISTS", "TRUE");
        }
        ci.setUserName(userName);

        ci.setUserPasswordHash(userPasswordHash);
        ci.setFilePasswordHash(filePasswordHash);
        ci.readProperties(originalProperties);

        originalProperties.setProperty("user", userName);
        if (userPasswordHash != null)
            originalProperties.put("_userPasswordHash_", userPasswordHash);
        if (filePasswordHash != null)
View Full Code Here

Examples of org.lealone.engine.ConnectionInfo

        if (baseDir == null) {
            baseDir = SysProperties.getBaseDir();
        }

        dbName = server.checkKeyAndGetDatabaseName(dbName);
        ConnectionInfo ci = new HBaseConnectionInfo(originalURL, dbName);

        if (baseDir != null) {
            ci.setBaseDir(baseDir);
        }
        if (server.getIfExists()) {
            ci.setProperty("IFEXISTS", "TRUE");
        }
        ci.setUserName(userName);

        ci.setUserPasswordHash(userPasswordHash);
        ci.setFilePasswordHash(filePasswordHash);
        ci.readProperties(originalProperties);

        originalProperties.setProperty("user", userName);
        if (userPasswordHash != null)
            originalProperties.put("_userPasswordHash_", userPasswordHash);
        if (filePasswordHash != null)
            originalProperties.put("_filePasswordHash_", filePasswordHash);

        if (server.getMaster() != null)
            ci.setProperty("SERVER_TYPE", "M");
        else if (server.getRegionServer() != null)
            ci.setProperty("SERVER_TYPE", "RS");
        HBaseSession session = (HBaseSession) HBaseDatabaseEngine.getInstance().createSession(ci);
        session.setMaster(server.getMaster());
        session.setRegionServer(server.getRegionServer());
        session.setOriginalProperties(originalProperties);
View Full Code Here

Examples of org.lealone.engine.ConnectionInfo

        } else {
            host = server.getRegionServer().getServerName().getHostname();
            port = ZooKeeperAdmin.getTcpPort(server.getRegionServer().getServerName());
        }
        String url = Constants.URL_PREFIX + Constants.URL_TCP + "//" + host + ":" + port + "/" + databaseName;
        ConnectionInfo ci = new HBaseConnectionInfo(url, databaseName);

        if (baseDir != null) {
            ci.setBaseDir(baseDir);
        }
        if (server.getIfExists()) {
            ci.setProperty("IFEXISTS", "TRUE");
        }

        ci.setUserName(userName);
        ci.setProperty("MODE", "PostgreSQL");

        ci.setUserPasswordHash(userPasswordHash);
        ci.setFilePasswordHash(null);

        if (server.getMaster() != null)
            ci.setProperty("SERVER_TYPE", "M");
        else if (server.getRegionServer() != null)
            ci.setProperty("SERVER_TYPE", "RS");
        HBaseSession session = (HBaseSession) HBaseDatabaseEngine.getInstance().createSession(ci);
        session.setMaster(server.getMaster());
        session.setRegionServer(server.getRegionServer());
        session.setOriginalProperties(originalProperties);
        ci.setSession(session);

        return new JdbcConnection(ci, false);
    }
View Full Code Here

Examples of org.lealone.engine.ConnectionInfo

        Properties info = new Properties();
        info.put("MODE", "PostgreSQL");
        info.put("USER", userName);
        info.put("PASSWORD", password);
        String url = Constants.URL_PREFIX + databaseName;
        ConnectionInfo ci = new ConnectionInfo(url, info);
        String baseDir = server.getBaseDir();
        if (baseDir == null) {
            baseDir = SysProperties.getBaseDir();
        }
        if (baseDir != null) {
            ci.setBaseDir(baseDir);
        }
        if (server.getIfExists()) {
            ci.setProperty("IFEXISTS", "TRUE");
        }

        return new JdbcConnection(ci, false);
    }
View Full Code Here

Examples of org.lealone.engine.ConnectionInfo

        String baseDir = server.getBaseDir();
        if (baseDir == null) {
            baseDir = SysProperties.getBaseDir();
        }
        dbName = server.checkKeyAndGetDatabaseName(dbName);
        ConnectionInfo ci = new ConnectionInfo(originalURL, dbName);
        ci.setUserName(userName);
        ci.setUserPasswordHash(transfer.readBytes());
        ci.setFilePasswordHash(transfer.readBytes());
        int len = transfer.readInt();
        for (int i = 0; i < len; i++) {
            ci.setProperty(transfer.readString(), transfer.readString());
        }
        // override client's requested properties with server settings
        if (baseDir != null) {
            ci.setBaseDir(baseDir);
        }
        if (server.getIfExists()) {
            ci.setProperty("IFEXISTS", "TRUE");
        }
        try {
            return (Session) ci.getSessionFactory().createSession(ci);
        } catch (SQLException e) {
            throw DbException.convert(e);
        }
    }
View Full Code Here

Examples of org.modeshape.jdbc.delegate.ConnectionInfo

    @Test
    public void shouldCreateConnectionInfoForUrlWithEscapedCharacters() throws SQLException {
        validUrl = JcrDriver.JNDI_URL_PREFIX
                   + "java:nameInJndi?workspace=My%20Workspace&user=j%20smith&password=secret&repositoryName=My%20Repository&teiidsupport=true";
        ConnectionInfo info = driver.createConnectionInfo(validUrl, validProperties);
        assertThat(info.getWorkspaceName(), is("My Workspace"));
        assertThat(info.getUsername(), is("j smith"));
        assertThat(info.getPassword(), is("secret".toCharArray()));
        assertThat(info.getRepositoryName(), is("My Repository"));
        assertThat(info.isTeiidSupport(), is(true));
    }
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.