Examples of Jdbc3SimpleDataSource


Examples of org.postgresql.jdbc3.Jdbc3SimpleDataSource

        DataSource candidate = super.createDataSource();
        if (candidate instanceof BaseDataSource) {
            // Any kind of DataSource from the PostgreSQL driver.
            return candidate;
        }
        final Jdbc3SimpleDataSource source = new Jdbc3SimpleDataSource();
        final Properties p = load();
        int portNumber;
        try {
            portNumber = Integer.parseInt(p.getProperty("portNumber", "5432"));
        } catch (NumberFormatException exception) {
            portNumber = 5432;
            Logging.unexpectedException("org.geotools.referencing.factory", DataSource.class,
                                        "<init>", exception);
        }
        source.setPortNumber  (portNumber);
        source.setServerName  (p.getProperty("serverName",   "localhost"));
        source.setDatabaseName(p.getProperty("databaseName", "EPSG"     ));
        source.setUser        (p.getProperty("user",         "Geotools" ));
        source.setPassword    (p.getProperty("password",     "Geotools" ));
        schema = p.getProperty("schema", null);
        return source;
    }
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.