Examples of GenericObjectPoolFactory


Examples of net.sf.hajdbc.pool.generic.GenericObjectPoolFactory

  @Override
  public <Z, D extends Database<Z>> StateManager createStateManager(DatabaseCluster<Z, D> cluster)
  {
    String location = MessageFormat.format(this.locationPattern, cluster.getId(), Strings.HA_JDBC_HOME);
    EnvironmentConfig config = new EnvironmentConfig().setAllowCreate(true).setTransactional(true);
    return new BerkeleyDBStateManager(cluster, new File(location), config, new GenericObjectPoolFactory(this));
  }
View Full Code Here

Examples of net.sf.hajdbc.pool.generic.GenericObjectPoolFactory

    database.setUser(this.user);
    database.setPassword(this.password);
   
    this.logger.log(Level.INFO, "State for database cluster {0} will be persisted to {1}", cluster, url);
   
    return new SQLStateManager<Z, D>(cluster, database, new GenericObjectPoolFactory(this));
  }
View Full Code Here

Examples of net.sf.hajdbc.pool.generic.GenericObjectPoolFactory

  @Override
  public <Z, D extends Database<Z>> StateManager createStateManager(DatabaseCluster<Z, D> cluster)
  {
    String location = MessageFormat.format(this.locationPattern, cluster.getId(), Strings.HA_JDBC_HOME);
    return new SQLiteStateManager<Z, D>(cluster, new File(location), new GenericObjectPoolFactory(this));
  }
View Full Code Here

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

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

     *
     * @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

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

     *
     * @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

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

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

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

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

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

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

     * @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
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.