# Class PoolingDataSourceBuilder

java.lang.Object
org.apache.cayenne.datasource.PoolingDataSourceBuilder

@Deprecated(since="5.0", forRemoval=true) public class PoolingDataSourceBuilder extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
in favor of `CayenneDataSource`
Turns unpooled DataSource to a connection pool. Normally you won't be creating this builder explicitly. Call `DataSourceBuilder.pool(int, int)` method instead.

Since:
  4.0

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PoolingDataSourceBuilder(DataSourceBuilder nonPoolingBuilder)`
  Deprecated, for removal: This API element is subject to removal in a future version.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ManagedPoolingDataSource`
  `build()`
  Deprecated, for removal: This API element is subject to removal in a future version.
  Builds a pooling DataSource that needs to be explicitly closed by the caller when no longer in use.
  `PoolingDataSourceBuilder`
  `maxConnections(int maxConnections)`
  Deprecated, for removal: This API element is subject to removal in a future version.
  `PoolingDataSourceBuilder`
  `maxQueueWaitTime(long maxQueueWaitTime)`
  Deprecated, for removal: This API element is subject to removal in a future version.
  `PoolingDataSourceBuilder`
  `minConnections(int minConnections)`
  Deprecated, for removal: This API element is subject to removal in a future version.
  `PoolingDataSourceBuilder`
  `validationQuery(String validationQuery)`
  Deprecated, for removal: This API element is subject to removal in a future version.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### PoolingDataSourceBuilder

    public PoolingDataSourceBuilder(DataSourceBuilder nonPoolingBuilder)
    Deprecated, for removal: This API element is subject to removal in a future version.

- ## Method Details

  - ### minConnections

    public PoolingDataSourceBuilder minConnections(int minConnections)
    Deprecated, for removal: This API element is subject to removal in a future version.

  - ### maxConnections

    public PoolingDataSourceBuilder maxConnections(int maxConnections)
    Deprecated, for removal: This API element is subject to removal in a future version.

  - ### maxQueueWaitTime

    public PoolingDataSourceBuilder maxQueueWaitTime(long maxQueueWaitTime)
    Deprecated, for removal: This API element is subject to removal in a future version.

  - ### validationQuery

    public PoolingDataSourceBuilder validationQuery(String validationQuery)
    Deprecated, for removal: This API element is subject to removal in a future version.

  - ### build

    public ManagedPoolingDataSource build()
    Deprecated, for removal: This API element is subject to removal in a future version.
    Builds a pooling DataSource that needs to be explicitly closed by the caller when no longer in use.