Package org.geotools.arcsde.session

Examples of org.geotools.arcsde.session.ArcSDEConnectionConfig


        // may an alternate SessionPoolFactory being set?
        checkAlternateSessionPoolFactory(ref);

        Object dereferencedObject = null;
        if (ISessionPool.class.getName().equals(className)) {
            ArcSDEConnectionConfig config = createConfig(ref);
            LOGGER.info("ArcSDEConnectionFactory: config is " + config);

            ISessionPool sharedPool = getSharedPool(config);
            LOGGER.info("ArcSDEConnectionFactory: shared pool is " + sharedPool);
View Full Code Here


        return dereferencedObject;
    }

    public ISessionPool getInstance(Map<String, Serializable> properties) throws IOException {
        ArcSDEConnectionConfig config = ArcSDEConnectionConfig.fromMap(properties);
        return getInstance(config);
    }
View Full Code Here

        String instance = getProperty(ref, INSTANCE_NAME_PARAM_NAME, null);
        String minConnections = getProperty(ref, MIN_CONNECTIONS_PARAM_NAME, "1");
        String maxConnections = getProperty(ref, MAX_CONNECTIONS_PARAM_NAME, "6");
        String connTimeout = getProperty(ref, CONNECTION_TIMEOUT_PARAM_NAME, "500");

        ArcSDEConnectionConfig config = new ArcSDEConnectionConfig();
        config.setServerName(server);
        config.setPortNumber(port);
        config.setDatabaseName(instance);
        config.setUserName(user);
        config.setPassword(password);
        config.setMinConnections(Integer.parseInt(minConnections));
        config.setMaxConnections(Integer.parseInt(maxConnections));
        config.setConnTimeOut(Integer.parseInt(connTimeout));

        validate(config);

        return config;
    }
View Full Code Here

        if (storeInfo instanceof CoverageStoreInfo) {
            String url = ((CoverageStoreInfo) storeInfo).getURL();

            if (null != url && url.startsWith("sde:")) {
                ArcSDEConnectionConfig connectionConfig;
                connectionConfig = ArcSDERasterFormat
                        .sdeURLToConnectionConfig(new StringBuffer(url));
                params.put(SERVER_NAME_PARAM_NAME, connectionConfig.getServerName());
                params.put(PORT_NUMBER_PARAM_NAME, connectionConfig.getPortNumber().toString());
                params.put(INSTANCE_NAME_PARAM_NAME, connectionConfig.getDatabaseName());
                params.put(USER_NAME_PARAM_NAME, connectionConfig.getUserName());
                params.put(PASSWORD_PARAM_NAME, connectionConfig.getPassword());

                // parse table name
                int idx = url.lastIndexOf('#');
                if (idx > 0) {
                    String tableName = url.substring(idx + 1);
View Full Code Here

            final String user, final String password, final ISessionPoolFactory sessionFac)
            throws IllegalArgumentException {

        final ISessionPool pool;
        {
            final ArcSDEConnectionConfig connectionConfig;
            Map<String, Serializable> params = new HashMap<String, Serializable>();
            params.put(SERVER_NAME_PARAM_NAME, server);
            params.put(PORT_NUMBER_PARAM_NAME, port);
            params.put(INSTANCE_NAME_PARAM_NAME, instance);
            params.put(USER_NAME_PARAM_NAME, user);
View Full Code Here

        if (storeInfo instanceof CoverageStoreInfo) {
            String url = ((CoverageStoreInfo) storeInfo).getURL();

            if (null != url && url.startsWith("sde:")) {
                ArcSDEConnectionConfig connectionConfig;
                connectionConfig = ArcSDERasterFormat
                        .sdeURLToConnectionConfig(new StringBuffer(url));
                params.put(SERVER_NAME_PARAM_NAME, connectionConfig.getServerName());
                params.put(PORT_NUMBER_PARAM_NAME, connectionConfig.getPortNumber().toString());
                params.put(INSTANCE_NAME_PARAM_NAME, connectionConfig.getDatabaseName());
                params.put(USER_NAME_PARAM_NAME, connectionConfig.getUserName());
                params.put(PASSWORD_PARAM_NAME, connectionConfig.getPassword());

                // parse table name
                int idx = url.lastIndexOf('#');
                if (idx > 0) {
                    String tableName = url.substring(idx + 1);
View Full Code Here

            final String user, final String password, final ISessionPoolFactory sessionFac)
            throws IllegalArgumentException {

        final ISessionPool pool;
        {
            final ArcSDEConnectionConfig connectionConfig;
            Map<String, Serializable> params = new HashMap<String, Serializable>();
            params.put(SERVER_NAME_PARAM_NAME, server);
            params.put(PORT_NUMBER_PARAM_NAME, port);
            params.put(INSTANCE_NAME_PARAM_NAME, instance);
            params.put(USER_NAME_PARAM_NAME, user);
View Full Code Here

TOP

Related Classes of org.geotools.arcsde.session.ArcSDEConnectionConfig

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.