Examples of ISessionPool


Examples of org.geotools.arcsde.session.ISessionPool

        seCRS.setXYByEnvelope(new SeExtent(-180, -90, 180, 90));
        return seCRS;
    }

    public void createSimpleTestTables() throws IOException, UnavailableConnectionException {
        final ISessionPool connectionPool = getConnectionPool();
        final ISession session = connectionPool.getSession();

        String tableName;
        String rowIdColName;
        int rowIdColumnType;
        int shapeTypeMask;
View Full Code Here

Examples of org.geotools.arcsde.session.ISessionPool

        final String baseTypeName = testData.getTempTableName();
        seRowidNoneTable = baseTypeName + "_ROWID_NONE";
        seRowidSdeTable = baseTypeName + "_ROWID_SDE";
        seRowidUserTable = baseTypeName + "_ROWID_USER";

        ISessionPool sessionPool = testData.getConnectionPool();
        ISession session = sessionPool.getSession();
        try {
            SeDBMSInfo dbInfo = session.getDBMSInfo();
            databaseIsMsSqlServer = dbInfo.dbmsId == SeDBMSInfo.SE_DBMS_IS_SQLSERVER;

            session.issue(new Command<Void>() {
View Full Code Here

Examples of org.geotools.arcsde.session.ISessionPool

    public static void oneTimeTearDown() {
    }

    @Before
    public void setUp() throws Exception {
        ISessionPool sessionPool = testData.newSessionPool();
        final boolean allowNonSpatialTables = true;
        ds = new ArcSDEDataStore(sessionPool, null, null, allowNonSpatialTables);

        // List<String> typeNames = new ArrayList<String>(Arrays.asList(ds.getTypeNames()));
        // Collections.sort(typeNames);
View Full Code Here

Examples of org.geotools.arcsde.session.ISessionPool

                try {
                    reader = readerCache.get(coverageUrl);
                    if (reader == null) {
                        final ArcSDEConnectionConfig connectionConfig = getConnectionConfig(coverageUrl);

                        final ISessionPool sessionPool = setupConnectionPool(connectionConfig);

                        final RasterDatasetInfo rasterInfo = loadRasterInfo(coverageUrl,
                                sessionPool);

                        final RasterReaderFactory rasterReaderFactory = new RasterReaderFactory(
View Full Code Here

Examples of org.geotools.arcsde.session.ISessionPool

        if (LOGGER.isLoggable(Level.FINE)) {
            LOGGER.fine("Getting ArcSDE connection pool for " + sdeConfig);
        }

        ISessionPool sessionPool;
        sessionPool = SharedSessionPool.getInstance(sdeConfig, SessionPoolFactory.getInstance());

        return sessionPool;
    }
View Full Code Here

Examples of org.geotools.arcsde.session.ISessionPool

        return sdeDStore;
    }

    final ArcSDEDataStore createDataStore(ArcSDEDataStoreConfig config) throws IOException {
        // create a new session pool to be used only by this datastore
        final ISessionPool connPool = poolFactory.createPool(config.getSessionConfig());

        return createDataStore(config, connPool);
    }
View Full Code Here

Examples of org.geotools.arcsde.session.ISessionPool

    public DataStore createDataStore(Map<String, Serializable> params) throws IOException {
        final String jndiName = (String) JNDI_REFNAME.lookUp(params);

        final Object lookup = lookupJndiResource(jndiName);

        final ISessionPool sessionPool = getSessionPool(jndiName, lookup);

        final String nsUri = (String) NAMESPACE_PARAM.lookUp(params);
        final String version = (String) VERSION_PARAM.lookUp(params);
        final boolean nonSpatial;
        {
            final Boolean allowNonSpatialTables = (Boolean) ALLOW_NON_SPATIAL_PARAM.lookUp(params);
            nonSpatial = allowNonSpatialTables == null ? false : allowNonSpatialTables
                    .booleanValue();
        }

        final ArcSDEConnectionConfig connectionConfig = sessionPool.getConfig();
        final ArcSDEDataStoreConfig dsConfig;
        dsConfig = new ArcSDEDataStoreConfig(connectionConfig, nsUri, version, nonSpatial);

        LOGGER.info("Creating ArcSDE JNDI DataStore with shared session pool for " + dsConfig);
        final ArcSDEDataStore dataStore = delegateFactory.createDataStore(dsConfig, sessionPool);
View Full Code Here

Examples of org.geotools.arcsde.session.ISessionPool

    @SuppressWarnings("unchecked")
    private ISessionPool getSessionPool(final String jndiName, final Object lookup)
            throws IOException, DataSourceException {

        final ISessionPool sessionPool;

        if (lookup instanceof ISessionPool) {

            LOGGER.info("Creating JNDI ArcSDE DataStore with shared session pool for " + lookup);
            sessionPool = (ISessionPool) lookup;
View Full Code Here

Examples of org.geotools.arcsde.session.ISessionPool

        testData.setUp();
        String tableName = testData.getRasterTableName(RasterCellType.TYPE_8BIT_U, 1, false);
        testData.loadTestRaster(tableName, 1, 1013, 1021, RasterCellType.TYPE_8BIT_U, null, true,
                false, SeRaster.SE_INTERPOLATION_NEAREST, 9);

        ISessionPool pool = testData.getConnectionPool();
        ISession conn = pool.getSession();

        final SeQuery q = conn.createAndExecuteQuery(new String[] { "RASTER" }, new SeSqlConstruct(
                tableName));

        try {
View Full Code Here

Examples of org.geotools.arcsde.session.ISessionPool

    /**
     * creates an ArcSDEDataStore using {@code test-data/testparams.properties} as holder of
     * datastore parameters
     */
    public ArcSDEDataStore getDataStore() throws IOException {
        ISessionPool pool = getConnectionPool();
        ArcSDEDataStore dataStore = new ArcSDEDataStore(pool);

        return dataStore;
    }
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.