Package org.apache.commons.pool.impl

Examples of org.apache.commons.pool.impl.GenericObjectPoolFactory


    public void setMaxConnections(int maxConnections) {
        this.maxConnections = maxConnections;
    }

    protected ObjectPoolFactory createPoolFactory() {
        return new GenericObjectPoolFactory(null, maximumActive);
    }
View Full Code Here


     *
     * @return the newly created but empty ObjectPoolFactory
     */
    protected ObjectPoolFactory createPoolFactory() {
         if (blockIfSessionPoolIsFull) {
            return new GenericObjectPoolFactory(null, maximumActive);
        } else {
            return new GenericObjectPoolFactory(null,
                maximumActive,
                GenericObjectPool.WHEN_EXHAUSTED_FAIL,
                GenericObjectPool.DEFAULT_MAX_WAIT);
        }
    }
View Full Code Here

     *
     * @return the newly created but empty ObjectPoolFactory
     */
    protected ObjectPoolFactory createPoolFactory() {
         if (blockIfSessionPoolIsFull) {
            return new GenericObjectPoolFactory(null, maximumActive);
        } else {
            return new GenericObjectPoolFactory(null,
                maximumActive,
                GenericObjectPool.WHEN_EXHAUSTED_FAIL,
                GenericObjectPool.DEFAULT_MAX_WAIT);
        }
    }
View Full Code Here

    public void setMaxConnections(int maxConnections) {
        this.maxConnections = maxConnections;
    }

    protected ObjectPoolFactory createPoolFactory() {
        return new GenericObjectPoolFactory(null, maximumActive);
    }
View Full Code Here

    public void setMaximumActive(int maximumActive) {
        this.maximumActive = maximumActive;
    }

    protected ObjectPoolFactory createPoolFactory() {
        return new GenericObjectPoolFactory(null, maximumActive);
    }
View Full Code Here

    public void setMaxConnections(int maxConnections) {
        this.maxConnections = maxConnections;
    }

    protected ObjectPoolFactory createPoolFactory() {
        return new GenericObjectPoolFactory(null, maximumActive);
    }
View Full Code Here

     * @param connectionData the broker connection data.
     * @throws Exception when the pool cannot be created.
     */
    void addConnectionPool(UUID brokerId,BrokerConnectionData connectionData) throws Exception
    {
        GenericObjectPoolFactory factory = new GenericObjectPoolFactory(
                new QpidConnectionFactory(brokerId,connectionData),
                connectionData.getMaxPoolCapacity(),
                GenericObjectPool.WHEN_EXHAUSTED_BLOCK,
                connectionData.getMaxWaitTimeout(),-1,
                true,
                false);
   
        ObjectPool pool = factory.createPool();

        // Open connections at startup according to initial capacity param value.
        int howManyConnectionAtStartup = connectionData.getInitialPoolCapacity();
        Object [] openStartupList = new Object[howManyConnectionAtStartup];
       
View Full Code Here

    public void setMaxConnections(int maxConnections) {
        this.maxConnections = maxConnections;
    }

    protected ObjectPoolFactory createPoolFactory() {
        return new GenericObjectPoolFactory(null, maximumActive);
    }
View Full Code Here

    public void setMaximumActive(int maximumActive) {
        this.maximumActive = maximumActive;
    }

    protected ObjectPoolFactory createPoolFactory() {
        return new GenericObjectPoolFactory(null, maximumActive);
    }
View Full Code Here

    ObjectPool getPool() {
        if (workers == null) {
            // create pool
            PoolableObjectFactory objectFactory = new AuthorityPoolableObjectFactory();
            ObjectPoolFactory poolFactory = new GenericObjectPoolFactory(objectFactory, poolConfig);
            this.setPool(poolFactory.createPool());
        }
        return workers;
    }
View Full Code Here

TOP

Related Classes of org.apache.commons.pool.impl.GenericObjectPoolFactory

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.