com.holonplatform.jdbc

## Interface BasicDataSource

- All Superinterfaces:
    AutoCloseable, Closeable, CommonDataSource, DataSource, Wrapper

      public interface BasicDataSource
      extends DataSource, Closeable

  Simple standard jdbc `DataSource` implementation, using the `DriverManager` class and returning a new `Connection` from every `getConnection` call.

  This DataSource is configured using standard connection properties and provides a fluent builder with methods to set base connection parameters, such as JDBC connection URL, username, password and a specific JDBC Driver. If no specific Driver class is configured, the JDBC DriverManager attempts to select an appropriate driver from the set of registered JDBC drivers.

  The DataSource is `Closeable` only for API consistency with other DataSource implementations, but the `close()` method does nothing by now.

  NOTE: This DataSource does not pool Connections. Can be useful for test or standalone environments outside J2EE containers.

  Since:
    5.0.4

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static interface` | `BasicDataSource.Builder` `BasicDataSource` builder.

  - ### Method Summary

    All Methods Static Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static BasicDataSource.Builder` | `builder()` Get a builder to create and configure a `BasicDataSource`.

    - ### Methods inherited from interface javax.sql.DataSource

      `getConnection, getConnection`

    - ### Methods inherited from interface javax.sql.CommonDataSource

      `getLoginTimeout, getLogWriter, getParentLogger, setLoginTimeout, setLogWriter`

    - ### Methods inherited from interface java.sql.Wrapper

      `isWrapperFor, unwrap`

    - ### Methods inherited from interface java.io.Closeable

      `close`

- - ### Method Detail

    - #### builder

          static BasicDataSource.Builder builder()

      Get a builder to create and configure a `BasicDataSource`.
      Returns:
        BasicDataSource builder

Copyright © 2019 The Holon Platform. All rights reserved.