Package com.volantis.mps.session.pool

Examples of com.volantis.mps.session.pool.SessionPoolImpl


            // when exhausted).
            final int waitTime = getIntValue(channelInfo,
                    ON_POOL_EXHAUSTED_WAIT, false, 60000);

            // Create the session pool.
            sessionPool = new SessionPoolImpl(sessionFactory, poolSize,
                    onPoolExhausted, waitTime, validateBeforeUse);
        }

        return sessionPool;
    }
View Full Code Here


        channelInfo.put(LogicaSMSChannelAdapter.SUPPORTS_POOLING, "yes");
        channelInfo.put(LogicaSMSChannelAdapter.POOL_SIZE, null);
        LogicaSMSChannelAdapter channelAdapter =
                new LogicaSMSChannelAdapter(CHANNEL_NAME, channelInfo);
        assertTrue(channelAdapter.sessionPool instanceof SessionPoolImpl);
        SessionPoolImpl sessionPool
                = ((SessionPoolImpl) channelAdapter.sessionPool);
        // Should default to having an unlimited pool size if no pool size
        // is specified.
        assertEquals(SessionPool.UNLIMITED_ACTIVE_SESSIONS,
                sessionPool.getMaxSize());
    }
View Full Code Here

        Map channelInfo = createChannelInfoMap();
        channelInfo.put(LogicaSMSChannelAdapter.BINDTYPE, "sync");
        LogicaSMSChannelAdapter channelAdapter =
                new LogicaSMSChannelAdapter(CHANNEL_NAME, channelInfo);
        assertTrue(channelAdapter.sessionPool instanceof SessionPoolImpl);
        SessionPoolImpl sessionPool
                = ((SessionPoolImpl) channelAdapter.sessionPool);
        assertEquals(3, sessionPool.getMaxSize());
        assertTrue(sessionPool.isValidatingOnBorrow());
        assertNull(channelAdapter.sessionValidator);
    }
View Full Code Here

            throws MessageException {
        Map channelInfo = createChannelInfoMap();
        LogicaSMSChannelAdapter channelAdapter =
                new LogicaSMSChannelAdapter(CHANNEL_NAME, channelInfo);
        assertTrue(channelAdapter.sessionPool instanceof SessionPoolImpl);
        SessionPoolImpl sessionPool
                = ((SessionPoolImpl) channelAdapter.sessionPool);
        assertEquals(3, sessionPool.getMaxSize());
        // Can't validate if communicating asynchronously, so always false.
        assertFalse(sessionPool.isValidatingOnBorrow());
        assertNull(channelAdapter.sessionValidator);
    }
View Full Code Here

        channelInfo.put(LogicaSMSChannelAdapter.BINDTYPE, "sync");
        channelInfo.put(LogicaSMSChannelAdapter.VALIDATE_SESSION_BEFORE_USE, "false");
        LogicaSMSChannelAdapter channelAdapter =
                new LogicaSMSChannelAdapter(CHANNEL_NAME, channelInfo);
        assertTrue(channelAdapter.sessionPool instanceof SessionPoolImpl);
        SessionPoolImpl sessionPool
                = ((SessionPoolImpl) channelAdapter.sessionPool);
        assertEquals(3, sessionPool.getMaxSize());
        assertFalse(sessionPool.isValidatingOnBorrow());
        assertNotNull(channelAdapter.sessionValidator);
        assertEquals(60000,
                channelAdapter.sessionValidator.getValidationInterval());

        // Then check that if the session validation interval is missing it
View Full Code Here

            throws MessageException {
        Map channelInfo = createChannelInfoMap();
        LogicaSMSChannelAdapter channelAdapter =
                new LogicaSMSChannelAdapter(CHANNEL_NAME, channelInfo);
        assertTrue(channelAdapter.sessionPool instanceof SessionPoolImpl);
        SessionPoolImpl sessionPool
                = ((SessionPoolImpl) channelAdapter.sessionPool);
        assertEquals(3, sessionPool.getMaxSize());
        // Can't validate if communicating asynchronously, so always false.
        assertFalse(sessionPool.isValidatingOnBorrow());
        assertNull(channelAdapter.sessionValidator);
    }
View Full Code Here

TOP

Related Classes of com.volantis.mps.session.pool.SessionPoolImpl

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.