Examples of ISessionPool


Examples of org.geotools.arcsde.session.ISessionPool

        }
    }

    public void deleteTable(final String typeName) throws IOException,
            UnavailableConnectionException {
        ISessionPool connectionPool = getConnectionPool();
        deleteTable(connectionPool, typeName);
    }
View Full Code Here

Examples of org.geotools.arcsde.session.ISessionPool

     *            wether to insert some sample rows or not
     * @throws Exception
     *             for any error
     */
    public void createTempTable(final boolean insertTestData) throws Exception {
        ISessionPool connPool = getConnectionPool();

        deleteTempTable(connPool);

        ISession session = connPool.getSession();

        try {
            /*
             * Create a qualified table name with current user's name and the name of the table to
             * be created, "EXAMPLE".
View Full Code Here

Examples of org.geotools.arcsde.session.ISessionPool

     *
     * @throws Exception
     */
    public void insertTestData() throws Exception {
        truncateTempTable();
        ISessionPool connPool = getConnectionPool();
        ISession session = connPool.getSession();
        try {
            SeLayer tempTableLayer = getTempLayer(session);
            insertData(tempTableLayer, session, tempTableColumns);
        } finally {
            session.dispose();
View Full Code Here

Examples of org.geotools.arcsde.session.ISessionPool

            session.dispose();
        }
    }

    public void truncateTempTable() throws IOException, UnavailableConnectionException {
        final ISessionPool connPool = getConnectionPool();
        final ISession session = connPool.getSession();
        final String tempTableName = getTempTableName(session);

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

Examples of org.geotools.arcsde.session.ISessionPool

        final ISession transSession;

        testData.truncateTempTable();

        {
            final ISessionPool connPool = testData.getConnectionPool();
            transSession = connPool.getSession();
            // start a transaction on transConn
            transSession.startTransaction();
        }

        // flag to rollback or not at finally{}
View Full Code Here

Examples of org.geotools.arcsde.session.ISessionPool

    public void testCreateDataStore_SessionPool() throws IOException {
        String jndiRef = "MyArcSdeResource_SessionPool";
        Map<String, Serializable> params = new HashMap<String, Serializable>();
        params.put(ArcSDEJNDIDataStoreFactory.JNDI_REFNAME.key, jndiRef);

        ISessionPool pool = testData.getConnectionPool();
        try {
            InitialContext initialContext = GeoTools.getInitialContext(GeoTools.getDefaultHints());
            initialContext.bind(jndiRef, pool);
            assertNotNull(initialContext.lookup(jndiRef));
        } catch (NamingException e) {
View Full Code Here

Examples of org.geotools.arcsde.session.ISessionPool

        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);

            dereferencedObject = sharedPool;
        } else {
            LOGGER.info("ArcSDEConnectionFactory: not a config");
View Full Code Here

Examples of org.geotools.arcsde.session.ISessionPool

        return getInstance(config);
    }

    public ISessionPool getInstance(ArcSDEConnectionConfig config) throws IOException {
        validate(config);
        ISessionPool sharedPool = getSharedPool(config);
        return sharedPool;
    }
View Full Code Here

Examples of org.geotools.arcsde.session.ISessionPool

    public void setClosableSessionPoolFactory(final ISessionPoolFactory newFactory) {
        this.closablePoolFactory = newFactory;
    }

    private ISessionPool getSharedPool(final ArcSDEConnectionConfig config) throws IOException {
        ISessionPool sharedPool = SharedSessionPool.getInstance(config, closablePoolFactory);
        return sharedPool;
    }
View Full Code Here

Examples of org.geotools.arcsde.session.ISessionPool

        LOGGER.info("Getting shared session pool for " + config);
        if (!instances.containsKey(config)) {
            synchronized (instances) {
                if (!instances.containsKey(config)) {
                    LOGGER.info("Creating shared session pool for " + config);
                    ISessionPool pool = factory.createPool(config);
                    SharedSessionPool sharedPool = new SharedSessionPool(pool);
                    instances.put(config, sharedPool);
                    LOGGER.info("Created shared pool " + sharedPool);
                }
            }
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.