code: public static GenericObjectPool<Integer> createConnectionPool(int maxConnections) {
          GenericObjectPool<Integer> connectionPool = new GenericObjectPool<Integer>(new ConnectionPoolObjectFactory());
          connectionPool.setMaxActive(maxConnections);
          connectionPool.setWhenExhaustedAction(GenericObjectPool.WHEN_EXHAUSTED_BLOCK);
          return connectionPool;
      }
docs: Creates a connection pool that can be used for one or more
  {@link PooledServiceSession} objects.
  
  @param maxConnections
  @return